Adds -d and -t options to 'query' command

'-d': prints a Python dictionary
'-t':
  without '-d', add type: prefix
  with '-d', use the explicit {'type': ..., 'value': ...} format