Interger division must be explicit for Py3k.
Fix escape_int().
query must by str/bytes, not unicode/str.