add Dir.chdir

Implemented chdir method on Dir class.