Merge "Call setupAppDir before EnsureDirExists"