Added fallback to allow requiring submodules (fixes #789)

I've added a fallback in the `requirePackage` function to allow requiring sub-modules (e.g. `require('some-dependency/subfolder/filename')`, see #789). This should improve compatibility with `npm` modules that are meant to be used this way.

I'm not sure how to test this properly but I have tried it successfully with a local fixture.