 
 #if os(Linux)
 import SwiftGlibc
+import Foundation
 #endif
 
 class PerfectLibTests: XCTestCase {

            ("testSubstringTo", testSubstringTo),
            ("testRangeTo", testRangeTo),
            ("testSubstringWith", testSubstringWith),
            
            ("testDeletingPathExtension", testDeletingPathExtension),
            ("testGetPathExtension", testGetPathExtension),
            
            ("testDirCreate", testDirCreate),
            ("testDirCreateRel", testDirCreateRel),
            ("testDirForEach", testDirForEach)

            XCTAssert(false, "Error while creating dirs: \(error)")
        }
    }

    func testDirCreateRel() {
        let path = "a/b/c/d/e/f/g"
        do {
            try Dir(path).create()
            XCTAssert(Dir(path).exists)
            var unPath = path
            repeat {
                try Dir(unPath).delete()

								// this was killing linux on the final path component
								//unPath = unPath.stringByDeletingLastPathComponent

								var splt = unPath.characters.split(separator: "/").map(String.init)
								splt.removeLast()
								unPath = splt.joined(separator: "/")

            } while !unPath.isEmpty
        } catch {
					print(error)
            XCTAssert(false, "Error while creating dirs: \(error)")
        }
    }

    func testDirForEach() {
        let dirs = ["a/", "b/", "c/"]
        do {
