added function for command line parameters. Implemented infile and outfile
added file existency check
Merge pull request #2 from siredmar/master

Adding command line options for infile and outfile. Can easily modified to return more opts.