Find the first file matching a given pattern in the current directory or the nearest ancestor directory.