Use os.path.expanduser("~") rather than custom getenv() code