Change all ~ occurences to $HOME.