for Windows compatibility, don't use os.environ["HOME"] (thanks to A. Berg)