Using argparse instead of optparse.

optparse has been deprecated since Python 2.7.
Tests for CLI arguments
Updated docs