changed derivation of __dirname and require() implementation.  Theoretically fixes #3