Fix minor issues with PR (global.location), update standalone JS file.
diff --git a/.gitignore b/.gitignore
index 5183459..38548b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
 .pub/
 build/
 packages
+.packages
 
 # Or the files created by dart2js.
 *.dart.js
diff --git a/lib/preamble.dart b/lib/preamble.dart
index a7a8764..62404d4 100644
--- a/lib/preamble.dart
+++ b/lib/preamble.dart
@@ -9,8 +9,9 @@
       var cwd = process.cwd();
       if (process.platform != 'win32') return cwd;
       return '/' + cwd.replace('\\', '/');
-    }) + "/"
+    })() + "/"
   };
+  
   global.scheduleImmediate = setImmediate;
   global.self = global;
   global.require = require;
diff --git a/lib/preamble.js b/lib/preamble.js
index 14da9a4..d252d3f 100644
--- a/lib/preamble.js
+++ b/lib/preamble.js
@@ -1,4 +1,14 @@
-global.location = { href: "file://" + process.cwd() + "/" };
+// TODO: This isn't really a correct transformation. For example, it will fail
+// for paths that contain characters that need to be escaped in URLs. Once
+// dart-lang/sdk#27979 is fixed, it should be possible to make it better.
+global.location = {
+  href: "file://" + (function() {
+    var cwd = process.cwd();
+    if (process.platform != 'win32') return cwd;
+    return '/' + cwd.replace('\\', '/');
+  })() + "/"
+};
+
 global.scheduleImmediate = setImmediate;
 global.self = global;
 global.require = require;