Fix invalid conditional
Make bin/build more idiomatic

* `printf` is more portable and consistent than `echo`
* $( ) is allowed and preferred
* Always quote all variables
* Useless use of `cat`
* Remove uneeded permissions setting
Regenerate compiled scripts
Use set -e and trap rather than "successfully"

Behavior should be identical. set -e will cause any failing command to
exit and the trap will output "failed" on stderr, like successfully used
to.
Regenerate compiled scripts