Modify traverseDependencies to check for the existence of package.json and node_modules. #6