Change function dir, cd. ADD function rmdir, mkdir, and Minor Refactoring