Fix ensure loaded for files and dirs.
Fix ensure loaded for files and dirs.

skoef/pkg,Open343/pkg,khorben/pkg,junovitch/pkg,khorben/pkg,en90/pkg,junovitch/pkg,khorben/pkg,Open343/pkg,en90/pkg,skoef/pkg