Modified code to allow creation of directories and navigation of said directories