This improves the error reporting, in particular for fs.ErrorPermissionDenied which was being reported as an IO error.