Issue #9819: don't try to encode TESTFN_UNICODE on Windows

mbcs (Windows default filesystem encoding) is now strict by default, and
depending on the code page, TESTFN_UNICODE may not be encodable to bytes.

Remove also unused "encoded" argument from _do_directory() method.
1 file changed