fixed segfault when home directory doesn't exist
Merge remote-tracking branch 'pasis/iss270'