resolve like require.resolve() on behalf of files asynchronously and synchronously
github.com/browserify/resolve
browserify/resolve