pub fn get_parent_folder(path: &Path) -> Cow<'_, Path>
Get the parent path of the given path, if there is none use the tempdir
path