fixed errors with update script
diff --git a/bin/lib/update.js b/bin/lib/update.js
index 0eccfe3..c76cc54 100755
--- a/bin/lib/update.js
+++ b/bin/lib/update.js
@@ -51,6 +51,7 @@
 }
 
 exports.updateProject = function(projectPath) {
+    console.log("ROOT: " + ROOT);
     var version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
     setShellFatal(true, function() {
         copyJs(projectPath);
diff --git a/bin/update b/bin/update
index 26e3393..9ba3d71 100755
--- a/bin/update
+++ b/bin/update
@@ -1,28 +1,31 @@
-#! /bin/sh
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# update a cordova/firefoxos project
-#
-# USAGE
-#   ./update [projectpath]
-#
-#!/bin/sh
+#! /usr/bin/env node
+/*
+        Licensed to the Apache Software Foundation (ASF) under one
+        or more contributor license agreements.  See the NOTICE file
+        distributed with this work for additional information
+        regarding copyright ownership.  The ASF licenses this file
+        to you under the Apache License, Version 2.0 (the
+        "License"); you may not use this file except in compliance
+        with the License.  You may obtain a copy of the License at
+ 
+          http://www.apache.org/licenses/LICENSE-2.0
+ 
+        Unless required by applicable law or agreed to in writing,
+        software distributed under the License is distributed on an
+        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+        KIND, either express or implied.  See the License for the
+        specific language governing permissions and limitations
+        under the License.
+*/
+var path  = require('path')
+var args = process.argv;
+var update = require('./lib/update');
 
-BIN_DIR=$(dirname "$0")
-source "$BIN_DIR/init"
-"$CORDOVA_NODE/node" "$BIN_DIR/lib/update.js" "$@"
+// Support basic help commands
+if(args.length < 3 || (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
+                    args[2] == 'help' || args[2] == '-help' || args[2] == '/help')) {
+    console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'update')) + ' <path_to_project>');
+    process.exit(1);
+} else {
+    update.updateProject(args[2]);
+}
diff --git a/bin/update.bat b/bin/update.bat
index 02bd6c7..d0aa7a0 100755
--- a/bin/update.bat
+++ b/bin/update.bat
@@ -1,21 +1,26 @@
+:: Licensed to the Apache Software Foundation (ASF) under one
+:: or more contributor license agreements.  See the NOTICE file
+:: distributed with this work for additional information
+:: regarding copyright ownership.  The ASF licenses this file
+:: to you under the Apache License, Version 2.0 (the
+:: "License"); you may not use this file except in compliance
+:: with the License.  You may obtain a copy of the License at
+:: 
+:: http://www.apache.org/licenses/LICENSE-2.0
+:: 
+:: Unless required by applicable law or agreed to in writing,
+:: software distributed under the License is distributed on an
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+:: KIND, either express or implied.  See the License for the
+:: specific language governing permissions and limitations
+:: under the License.
+
 @ECHO OFF
-goto comment
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-:comment
-call "%~dps0init"
-"%CORDOVA_NODE%\node.exe" "%~dps0\lib\update.js" %*
+SET script_path="%~dp0update"
+IF EXIST %script_path% (
+    node %script_path% %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'update' script in 'bin' folder, aborting...>&2
+    EXIT /B 1
+)