Bug 922540 - rewrite build/additional-extensions.py in javascript

https://bugzilla.mozilla.org/show_bug.cgi?id=922540