Fix pattern substitution for Lua 5.2

	% can only be followed by a digit or another %