pub fn expand_tilde(path: PathBuf) -> PathBuf
Takes a PathBuf, if it contains ~ then replaces it with HOME and returns the new PathBuf, else returns path. If path is not utf-8 then it will not expand ~.