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`
Build fixed mac script