pub fn ensure_parent_dir<P>(path: P) -> Result<(), Error>where P: AsRef<Path>,
Create parent directory of a path if not exists.