Added support for require(), including module caching.