Fix paths when building on Windows

On Windows, File.separator is "\" which must be escaped to "\\" in the regex.