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.