cwd is supposed to come from process.cwd, but in case of the tests, it is initialized - see this https://github.com/karma-runner/karma/blob/master/test/unit/init.spec.coffee#L114

I could fix it in the test only, but then if we add a new test case, they have to be tested on windows also. Given that it is permitted for cwd to not come from process.cwd (atleast for tests) , i sanitized it in the function.