Catch OSError when a folder can't be read.

When traversing a directory tree, e.g. the project root, and a
directory is not readable anymore, catch and ignore this error.

Couldn't find an appropriate place for a unit test for this. Would require setting up a directory tree with one directory being chmod 000.