Switched to Python's built-in argparse module. More robust and saves lines.