Adding support for quering data from a bugtool.

Signed-off-by: Rob Dobson <rob.dobson@citrix.com>