Fix bug which caused withCwd to work incorrectly on Windows with paths
containing \