dirdiff: Fix display of encoding errors when scanning folders (#235)
The existing handling was Python 2 era. In the current code, we'll always have a `str`-type root for our `os.listdir()` call, so the entries will always be `str`s. This patch handles the Python 3 path handling situation of getting surrogate escaped paths (in the case of a bad file name vs. filesystem encoding) by just checking for a valid re-encode and treating any failure as an encoding error.
Showing with 5 additions and 5 deletions