Track invalid arguments better in build.js. [closes #303]
Fix failing build tests.