pub fn validate_path<P: AsRef<Path>>( path: P, base_dir: &Path, ) -> Result<PathBuf>
Validate file path to prevent directory traversal