User os.path.expanduser instead of os.getenv for windows.