set S_IFDIR flag in _createRoot