Modify write SQL checking to use a regular expression for more flexible ...

...matching, eg. "   update foo" as well as "UPDATE foo".

Fixes an issue with some manually-generated queries I have that were not being prevented with the simple startswith() check.