Code formatting because ... OCD

I rearranged the logic of the OS selection into a constructor. I also updated the API that is exposed to follow the camel casing that the path module does.
* `tempdir` => `tempDir`
* `homedir` => `homeDir`
* `datadir` => `dataDir`