Issue #9: fix test_ignore_dirs on Windows.

Taken from Ben Hoyt's fork.