check an array of search paths to find a file