Added a zone argument to metdata queries

Fixed where the search root path was not sized correctly

Added more memory allocation checks
Added json-metaquery program

Improved error handling to identify bad UTF-8 input
Merge pull request #21 from keithj/devel

Added json-metaquery program and a zone argument to metdata queries