bug-36 add update mode and move index.js as a standalone exeutable
Merge pull request #1 from john-hu/bug-36-update-mode

bug-36 add update mode and move index.js as a standalone executable, r=thomas.