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