Use plain string searching for test exclusions.

Closes gh-4243
Make check for pywin32 more portable.

The attribute is message in Python 2, msg in Python 3.
Merge pull request #4259 from takluyver/win-test-exclusions

Fix Windows test exclusions