coredata: Ignore directories when searching for machine files
coredata: Ignore directories when searching for machine files

Otherwise having an output directory matching the name of the cross file
in the current working directory will cause an error. This patch instead
collects any invalid names and prints them along with the error message
when no valid file can be found.

Fixes #5640

QuLogic/meson,jpakkane/meson,jpakkane/meson,pexip/meson,mesonbuild/meson,pexip/meson,QuLogic/meson,becm/meson,becm/meson,jpakkane/meson,becm/meson,becm/meson,mesonbuild/meson,mesonbuild/meson,QuLogic/meson,becm/meson,mesonbuild/meson,becm/meson,becm/meson,mesonbuild/meson,jpakkane/meson,mesonbuild/meson,QuLogic/meson,pexip/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson,becm/meson,QuLogic/meson,mesonbuild/meson,pexip/meson,pexip/meson,becm/meson,mesonbuild/meson,pexip/meson,pexip/meson,pexip/meson,jpakkane/meson,mesonbuild/meson,jpakkane/meson,jpakkane/meson,QuLogic/meson,QuLogic/meson,pexip/meson,becm/meson,mesonbuild/meson,jpakkane/meson,pexip/meson