deal with `~` paths in *nix environments