Use HOME environmental variable not  ~ for Darwin

Also update test_helpers to use /Users instead of /home for Darwin.