Added createOnInstall support for directories