In wrappers, guard against #including dirs.

If an include directive found a directory with the name of the include
it would try to load it as a file, which caused a fatal error.  Instead,
check for directories and skip them.