pub fn create_validated_pathbuf(path_str: &str) -> Result<PathBuf, String>
Creates a PathBuf from a string after validate_path_str.
validate_path_str