Windowsissues

Fix windows issues as in #521 
Posix is now an optional dependency, and so will still work on posix systems. npm install will attempt to build the posix module, but it won't fail if it doesn't build. Code has been added to all files (including tests) to make posix optional.
regex has been altered for the compile function which simply changes path.sep to \\\\ if it is \\