handle the $HOME (and similar) env var not being set

some environments like Jenkins doesn't always have a $HOME env var
Merge pull request #1 from sindresorhus/much-fault-tolerant

handle the $HOME (and similar) env var not being set