Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.
os.path/expanduser
expanduser