[bugfix] Error with unescaped apostrophe in SQL, e.g. filenames. Corrected.