Reporting to couchdb for tests works, should fix return code to be stdout instead of errno
Return stdout for query(), so that it can be handled by the python layer too