Modify Lua's "require" function to use a custom loadfile function