Fixed mysql escape in deleteBlock function

The deleteBlock function could throw an 'Unexpected Error' without this commit if you do the following:

1. Create a template with an Area whose handle includes an apostrophe.
2. Create a block within that Area.
3. Attempt to delete that block.

This commit fixes this problem by escaping the query.