code: function loadJSFile(x) {
              console.log("Loading local module "+ x +" for " + data.moduleName);
              data.moduleCode = fs.readFileSync(x).toString();
              return true;
          }
docs: This is the original code * if (fs.existsSync("modules/"+data.moduleName)) { console.log("Loading local module "+"modules/"+data.moduleName); data.moduleCode = fs.readFileSync("modules/"+data.moduleName).toString(); } else if (fs.existsSync(data.moduleName)) { console.log("Loading local module "+data.moduleName); data.moduleCode = fs.readFileSync(data.moduleName).toString(); } 
  Implements the require.resolve() rules as per node
  (ref: https://nodejs.org/api/modules.html#modules_all_together)
  except currently where noted in the comments.
  
  The default path for modules is './modules'
  although I propose this should be changed to './espruino_modules'
  to put it in the espruino namespace
  and/or this could be made a user-definable parameter