add cross-platform folder creation logic.