Changes to argument parsing

The period and delay are now explicitly specified via -p/--period and
-d/--delay. I think this makes this script more self-documenting and
mistake-proof. Now using argparse.