     let script = Process.arguments[0];
 
     if script.hasPrefix("/") { // absolute
-        let path = script.stringByDeletingLastPathComponent
+        let path = (script as NSString).stringByDeletingLastPathComponent
         return path
     }
     else { // relative


        if let urlPath = NSURL(string: script, relativeToURL: urlCwd) {
            if let path = urlPath.path {
                let path = path.stringByDeletingLastPathComponent
                return path
            }
        }

    }

    func camelCaseMethodName() -> String {
        let components: [String] = self.characters.split{$0 == " " || $0 == "-"}.map(String.init)
        var camelCaseComponents = components.map { $0.capitalizedString }
        if camelCaseComponents.count > 0 {
            camelCaseComponents[0] = camelCaseComponents[0].lowercaseString
