[query.rb] turn to string before testing for existence in #escape. added...

... simple test. 

fixes #261