Check return value of getenv("HOME")
Merge pull request #488 from czchen/bugfix/getenv

Check return value of getenv("HOME")