Read commandline arguments using argparse.

In previous version the commandline arguments were read manually. Now,
they are read using argparse.

Also, file now passes PEP8 check (using Flake8).