             productionSettings.writeToFile(dstPath ?? bundledPath, atomically: true)
         }
         
-        let settingsAdjusted = processSettings(settingsPath, availableEnvs, allowedEnv: allowedEnv)
+        let settingsAdjusted = processSettings(settingsPath, availableEnvs: availableEnvs, allowedEnv: allowedEnv)
         if settingsAdjusted == false {
-            println("\(__FILE__):\(__LINE__): Unable to adjust settings bundle")
+            print("\(__FILE__):\(__LINE__): Unable to adjust settings bundle")
         }
         return settingsAdjusted
     }


let count = Process.arguments.count
if count == 1 || count > 5 {
    println("\(__FILE__):\(__LINE__): Received \(count) arguments, Proper usage: processEnvironments.swift -- [bundledPath] [srcPath] [settingsPath] [allowedEnv]")
    exit(1)
}


    let preferenceKey = "PreferenceSpecifiers"
    settingsPath = (settingsPath as NSString).stringByAppendingPathComponent("Root.plist") as String
    
    if let settings = NSMutableDictionary(contentsOfFile: settingsPath) {
        if var existing = settings[preferenceKey] as? [AnyObject] {
            existing = existing.filter {
                if let dictionary = $0 as? [String:AnyObject] {
