添加函数EnsureDirectoryExists