Patch from fabio, wrapped to fit within 80 char lines, and added exit code 1 to error situations.
Fixes #2336 (closed)