pub fn ensure_parent_dir(path: &Path) -> Result<()>
Ensures the parent directory for the provided path exists, creating it if necessary.