process: chdir with callback implementation
Add an optional callback argument to the process.chdir function which enables execution of a closure in a directory different than the outer scope. Also improve error messages that can be thrown and make sure existing tests continue to pass.