fn is_dir_writable_for_user(dir: &PathBuf) -> bool