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')`). 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 with a local fixture.