Repair to work in windows

HOME environment variable usually not defined in windows.