Replace ~ in profile with $HOME