Rewrites the cli argument parser as a function and adds tests

I can't quite get the test right tho...
[#3] Fix failing argument parsing tests
Merge pull request #21 from open-contracting/3-commandline-args

3 commandline args