Fixed up mkdir_test because rmdir does not clean up recursively.
Added return code checking to mkdir_test.
Added chdir_test.