fn is_dir_writable_for_user(dir: &Path) -> bool