Revert "Add support for chdir and getcwd"

This reverts commit fb6f315257a8752c3a8b96a71261a5613a6f2069.
Remove chdir changes for now. Needs more testing.