Why not simply `MakeParentDirectory(GetStateDir(), false);` ?