Switching to PyMySQL's escape function.
Finishing escaping conversion.
More fixes to facts module.