/**
 * Allow code that lives on the server to resolve paths like
 * require("plugins/c9.language/language"),
 * just like on the client.
 */
var modules = require("module");
var oldResolve = modules._resolveFilename;
var path = require("path")
var root = path.join(__dirname, "/../..");
var extraPaths = [ root ];
modules._resolveFilename = function(request, parent) {
    if (!parent) parent = { paths: [], filename: "" };
    // Ensure client extensions can be loaded
    request = request.replace(/^lib\//, "node_modules/");
    // ensure we never use node_modules outside of root dir
    parent.paths = parent.paths.filter(function(p) {
        return p.indexOf(root) == 0
    });
    // Add the extra paths
    extraPaths.forEach(function(p) {
        if (parent.paths.indexOf(p) === -1)
            parent.paths.push(p);
    });
    return oldResolve(request, parent);
};

@@ -581,16 +581,85 @@
 oot dir%0A
+    if (parent.paths%5B0%5D && parent.paths%5B0%5D.indexOf(root) == 0) %7B%0A    
     pare
@@ -695,32 +695,36 @@
 r(function(p) %7B%0A
+    
         return p
@@ -742,24 +742,35 @@
 ot) == 0
+;
 %0A    
-%7D);
+    %7D);%0A    %7D
 %0A    // 

fix loading pty.js in local version