Changed how the local require() function invokes the global require() function, so that require() can be overridden from the outside, allowing require definitions to be temporarilly overridden for the duration of a test.