Switch from optparse to argparse for command line parsing.

optparse was deprecated in favor or argparse. The behaviour of the
command line should not change.