Changed from getopt() to the optparse module for handling command line
options.

This code isn't very thoroughly tested, but it seems to work, and it's
MUCH easier to maintain now.
This module contains the getTerminalSize() function and the
IndentedHelpFormatterWithNL class. Both are handy to have when using the
standard optparse module.