Renames a dependency in a package.json file.