Escape trailing backslashes in the values of MySQL insert queries