Using path.delimiter here seems okay to me but why are you changing the prototype of Module._initPaths()?