re-did the code using argparse.

Now input files can be stdin or filenames
Updating readme and init.py