Fixed crashing issue when running on Windows machines, which don't define %HOME% by default.
Merge pull request #1 from MartinSGill/master

Fixed crash in Windows where the HOME environment variable isn't normally defined.
(also, lots of white space clean up :)