Better error reporting for non-regular files.

The substitution fails when a file is not a regular file.  The old
error message reported that the file was a directory.  This patch alters
it to report that the file was a non-regular file.