Fixing redundant call to statSync.
This is funny. Ace Editor clobbers our require definition, but is smart enough to save a reference to it and call it if its own require mechanism fails.

The only problem is that it does not pass the same arguments to our function. If we call require("./methods"), they will call our method as require("", "./methods", null).

As a hackfix, I have changed our require to have a second optional argument that is used in favor of the first.