Fix some readme and script bugs in examples (take 2).

Ah sorry I didn't notice this before, but please set the three options in the top of this script:

```shell
set -o errexit
set -o nounset
set -o pipefail
```