Fix lua syntax on gsub to be more exact (percent signs are invalid in the replace field unless followed by another percent sign or a number... escaping characters is unnecessary)