Added functionality for changing directories using cd command.