Added unit test for chdir