Added json-list program (simply lists data objects and collections as JSON)

Refactored some error handling to remove bugs and improve consistency
between functions.
Merge pull request #23 from keithj/devel

Added json-list program