Adding support for require.resolve.

Related to issue #121.