Added is_directory function as well as list_contents function'