Fix walk code for files that do not exist anywhere, and unhandled types.
Prior to this, a file that did not exist was reported as showing up in
the filesystem, as were files of unsupported types (such as fifos).
Now, an error message is printed and nothing is returned in such cases.
This change also moves the commands.pathto function to the util module,
as the walk code needs it to print non-confusing error messages.