Fix bug in zshrc and tighten up code
The bug was that tilde expansion was inconsistent, so one of the tests always failed. Replaced ~ with $HOME.
The bug was that tilde expansion was inconsistent, so one of the tests always failed. Replaced ~ with $HOME.