Fix bug: Single quotes in data was breaking query.

Added support to escape single quotes in queries.
Single quotes are used to designate strings in the query dsl.
If the string value itself contains a single quote then it will be escaped
with a \.