don't find directories when searching for executables

This was noticed initially as Perl-Toolchain-Gang/Module-Metadata#8.