Catch errors while walking the filesystem

An EACCES during a filesystem walk stopped the walk with a bubbling error.

Fixes #1008

Since I don't have the build toolchain installed, please someone test this before merging.