On Windows, unescaped $file in regex pattern causes tests to fail

Wrap each filename interpolated into a regex pattern with \Q ... \E