cmd/shfmt: handle errors properly in filepath.Walk
cmd/shfmt: handle errors properly in filepath.Walk

If the provided error is non-nil, info might be nil. We should check the
error first.

In practice, this only triggered with weird corner cases such as running
'shfmt -f /' inside a container, since some special files would give
weird I/O errors. As such, it's hard to write a small test for this.

The new code seems logical, and it's unlikely we'll break it again, so
don't add a test for now.

Fixes #466.

mvdan/sh,mvdan/sh,mvdan/sh,mvdan/sh