Add tests for withCwd function
Extend tests for withCwd (handle Windows value for path.sep)
Attempt to fix security issue with withCwd and '../' in paths.

New version of withCwd is commented explaining rational.