When glob pattern contains a trailing slash match only directories. Fixes bug 10278.
Print the reason why preloading failed in do_preload()