Replace $HOME with ~.