Make extensions optional in js (don't crash when none are provided)
Fix parens in if statement

(oops, haven't written js in a while :stuck_out_tongue_closed_eyes:)
Merge pull request #2 from bjlange/master

Make extensions optional in JS