Command-line argument parser based heavily on Python's argparse