Fixed issue where HOME isn't able to be inferred from ~, related to issue #58