(sramp-185) Query command improvement (CLI)

Improved the query command a bit - it should be less confusing when the
user makes an error (it's now a bit more restrictive, but also explains
better when things go wrong).

JIRA: https://issues.jboss.org/browse/SRAMP-185