Use cliparse's new API, and handle error cases.
Merge pull request #258 from nevir/cliargs-fix

Use cliparse's new API, and handle error cases.