Re-implemented to check for HOME existence. Tried an RSpec test.