pathfind looks for a file in a list of directories. The argument `path' is a colon separated list of
directories, typically the contents of an environment variable like PATH, MANPATH, or CDPATH. The
function will go through the directories in the path and look in each directory for a file given in
argument `target' until it finds it. Only an exact match is reported, no wild cards or globbing.
The names that are matched are formed by taking an element from the path and prepending it to target. An
empty element means the current directory, as does the name ".".
The function returns -1 for failure (not found or error), or the total size for the full name (the full
name may have been truncated when stored into result).