Detect home directory in way that is safe for cross-compilation.

Using the built-in 'os/user' package requires cgo, which means that
binaries cross-compiled on Darwin for Linux don't work.
Merge pull request #4 from dogestry/cross-compilable-homedir

Detect home directory in way that is safe for cross-compilation.