handle nil home directory error

ArgumentError: couldn't find HOME environment -- expanding `~'