Add logging, and -v option to increase verbosity.

No logging by default.  Increasing the number of -v switches on the command
line increases the amount of logging.  One for a short summary, two to
log file open and close.  Three to log file reads and writes.