Use path.sep instead of custom solution

Just discovered this while searching in the source of node for some work on `npm`.

I added the tests as separate commit as I refactored the `_initPaths` a little bit to make it better testable.