added test for already installed modules and changed how missing a package.json is considered