Bug 671705 - Add a utility function to escape strings for use in regexes. r=hskupin