Put SQL dialect escape back into safely function.

Safely ideally wouldn't have dialect specific code but since I haven't
written a better way to do this yet I can return support for SQLite3
until I get it sorted.