maintain consistent return values.

Files return 'undef' and emit warning if not found. Directories just
return expected directory, no check at this time.