     }
 }
 
-func isDirectoryAtPath(mgr: NSFileManager, path: String) -> Bool
+func isDirectoryAtPath(path: String) -> Bool
 {
     var isDir: ObjCBool = false;
-    return mgr.fileExistsAtPath(path, isDirectory: &isDir) ? isDir ? true : false : false
+    return fmgr.fileExistsAtPath(path, isDirectory: &isDir) ? isDir ? true : false : false
 }
 
 func ProcessDirectory(path: String)
 {
+    if verbose > 1 { println("examining directory '\(path)'") }
+
     let dir = fmgr.contentsOfDirectoryAtPath(path, error: nil)!;
-
-    if verbose > 1 { println("examining directory '\(path)'") }
-    for i in dir {
-        let name = i as String;
+    for name in filter(map(dir, { $0 as String }), { !$0.hasPrefix(".") }) {
         let fullname = path.stringByAppendingPathComponent(name);
 
-        if name.hasPrefix(".") { continue }
-        if isDirectoryAtPath(fmgr, fullname) {
+        if isDirectoryAtPath(fullname) {
             ProcessName(path, name);
             if recurse { ProcessDirectory(fullname) }
         }

    ProcessName(dirname, basename);
}

func Main(progname: String, arguments: Slice<String>) -> ()
{
    for arg in arguments {
        switch (arg) {

    {
        var isASCII = true;
        var y: [UInt8] = [];

        func ShortCode(l: UnicodeScalar, c: UnicodeScalar) -> UnicodeScalar
        {
            let s = "\(l)\(c)";
            let r = memoizer[s];
            if let y = r { return y }

            for i in 0x80...0xFF {
