A configurable `require` function which aims to make testing easier.