Catch common bash runtime errors in chutney scripts
Let's gradually convert our scripts to use:
set -e set -u set -o pipefail
These settings help catch common errors in bash scripts at runtime: http://redsymbol.net/articles/unofficial-bash-strict-mode/
(Shellcheck helps us catch errors while writing scripts, but it can't help with runtime failures.)
Follow-up to #33451 (moved).