Add option to filter out extraneous dependencies

This is useful in case you have devDependencies and/or other packages
installed, but only want to check the dependencies of the root package.