Resolve issue with invalid json being returned as there are non-unique keys - and changed format from 'keys' to 'results' where returnterms is requested.  Further work required in order to verify the results, in particular as an array of {term, key}s the write output format