(#22918) Allow paths file to be read and appended to

Previously, on Windows, the `path_match` method would fail to read the
`paths` file, because it would reopen the file, but an exclusive lock
was already on the file.

This commit changes the `path_match` method so that it takes the
exclusively locked file handle, which must be opened for both read and
append (a+). Note that reads, e.g. `each_line`, occur from the
beginning of the file, while writes occur at the end, so that we don't
have to seek within the file.
(Maint) Exclude `fork` based tests on Windows

We have to skip these tests on Windows because fork is not supported.