Don't try to stat() not-on-disk ccache residuals

Don't assume that source ccache residual names are filenames which we
can stat() usefully, but try to keep doing so when they at least name
items with pathnames (i.e., files and directories).