Fixed the warnings and added basic functionality for the CD command.