     }
 
     var failedCreates = [String]()
-    for url in generatedFolders {
+    for url in generatedFolders.leafPaths() {
       if !createDirectory(url, failSilently: true) {
         failedCreates.append(url.path!)
       }

    }
  }


  /// Encapsulates high level information about the generated Xcode project intended for use by
  /// external scripts or to aid debugging.

  private func createGeneratedArtifactFolders(mainGroup: PBXGroup, relativeTo path: NSURL) {
    if suppressGeneratedArtifactFolderCreation { return }
    let generatedArtifacts = mainGroup.allSources.filter() { !$0.isInputFile }

    let generatedFolders = PathTrie()
    for artifact in generatedArtifacts {
      let url = path.URLByAppendingPathComponent(artifact.sourceRootRelativePath)
      if let absoluteURL = url.URLByDeletingLastPathComponent?.URLByStandardizingPath {
