Fail fast on error

This pull request adds `set -e` to the file (for fail-fast), and removes some of the pipes to stderr that will hide legitimate errors. A couple of small changes are also required to avoid doing things that we know will produce errors / junk on stderr.