Switch to 'tr' for lowercasing.

The bash substitution code only worked on Bash 4.2 which
made it painful for using the scripts on Mac OS X.  The 'tr'
version is much more Mac friendly
Use $HOME to detect the users home instead of assuming /home.

The use of $HOME makes the program more tolerant of differences between
machines and specically it works correctly on the Mac now.
Merge pull request #1 from mdlavin/mac-fixes

Various fixes for Mac OS X