Better command-line parsing: -f, -h flags

Inspired by http://blog.mafr.de/2007/08/05/cmdline-options-in-shell-scripts/

Shame that the getopts shell builtin doesn't support long option names
like --help or --version.