[1.7.x] Fixed #23298 -- Made makemessages actually ignore specified dirs on Windows.

This was detected by two failures in the i18n.test_extraction of our
test suite.

Refs #20422, refs #22336

Backport of b4dce7c37a from master