Fix warning on unset HOME env variables

Inspired by pull request #334 (carbin++).  This approach has fewer dynamic
variable lookups than the pull request.