Fix directory exclusion on Windows. (#881)

* Fix `GetCommandLineFilesTest.tearDown()` on Windows

Deleting a folder that is the working dir of any running process is a
PermissionError on Windows. The above test should therefore `os.chdir()`
out of a temp dir before trying to delete it.

* Strip trailing path separators from `exlcude` paths

* Fix excluding folders on Windows

Folder exlusion had no effect on Windows because `os.walk()` output uses
backslash path separators but `IsIgnored()` was hardcoded to use forward
slash. Replace hardcoded '/'s with `os.path.sep`.
3 files changed