build failures: set build.code to exit code

and add it to the log footer.
Also stop using bash commands to echo success or failure.
Merge build-log--remove-bash-echos (#56) into master

build failures: set build.code to exit code

and add it to the log footer.
Also stop using bash commands to echo success or failure.