implemented cd, chdir and dir commands