use File::HomeDir

Not all systems set $ENV{HOME} (or at least my Win 7 doesn't). Use File::HomeDir to get the home directory in a cross-platform manner.