Use path sep

Just discovered this while searching in the source of node for some work on `npm`.

I added the tests as separate commit as I had to refactor the `_initPaths` a little bit to make it testable, but I can rebase it if you want.