Added a sys.platform check for homeDir()

It should still work for os x now and it now works on my machine.