Refactor require-tree to not share messages and export parsePackageJson

Related to #2179

- Pass in messages to each method so they are not shared
- Export each method for calling individually
- Update reference to default export of require-tree
- Add default values for messages if not passed in