Replace optparse with argparse.

Use command line args to determine output filename.