Fix process.cwd() in tests