Better module loading for Node.JS

Fixed double file reading when loading modules