Find user's home dir even if $HOME is deleted

Dir.home will raise ArgumentError if $HOME is undefined. It can still find the
home directory correctly if given a username.