Escape paths which are passed into the regex