change ~ to $HOME

Rather than using "~" to refer to the home directory path, changed it to "$HOME" because this seemingly works better with Mavericks.