Skip directories on which we get IOErrors

Fixes #1