Avoid using an undefined variable, add --mode=dev and add documentation
This MR contains several loosely-related changes.
- a fix for using an undefined variable.
- addition of --mode=dev and --mode=batch (default); ATM --mode=dev does parallel=true and set -u
- init code is invoked after argument parsing
- the script gains --help
- a README.md