Use argparse rather than getopt (closes #2).