[Fix #1427] Exclude top level directories early

Take the excluded top level directories out of the equation
altogether so that they are not searched for files. This
is an optimization to speed up the target file search phase
when there is, for example, a vendor directory with a lot
of files in it (a top level vendor directory is excluded
by default).