Refactor all scripts to extend the BaseScript.

BaseScript ensures that even uncaught exceptions are logged and
provides utility functions for dealing with command line arguments
and parsing out options.
Make reset also reset files in the work directory.