Change posix module to optional dependency

- Add posix to optionalDependencies in package.json
- Change config.coffee to allow posix to be optional
- Change index.coffee to allow posix to be optional

Fixes #556
Ensure regex works on windows

Change backslash to double backslash for windows
Fixes #521.