Switch to argparse for option parsing.
Much cleaner code now.