pub fn expand_home(path: &str) -> Result<PathBuf, NoHomeFolder>
path with a leading ~ standing for the user’s home folder.
path
~
When path starts with ~ and the home folder can’t be found.