Refactor handling of home directory creation (fix #270)
fixup! perltidy