Win32: ignore files ending in '.' or at least one space

Fixes #416
Fixes #2176