Add argparse to script, run from command line

Added argparse to the script, can now run all of the functionality from
command line.