OMG!  "set -e" is switched off in shells also for shell function
internals.  Functions cannot even turn them back on!
That means this script was totally buggy, now it has less bugs
but is more ugly.