expand_regex(): quote the arguments properly

A single-quote cannot occur within single-quotes on a POSIX shell.