Remove Dir.chdir for thread-safety

Dir.chdir doesn't work in multithreaded/async environments. The `native` method has support for a `:chdir` option though. There are probably chdir's I've missed but this is a start.