Implemented cd command fully to specs.