 	public typealias ErrorReceiver = (NSError) -> ()
 	
 	public let pathComponents: [String]
+	public let domainMask: NSSearchPathDomainMask
 	public let directoryBase: NSSearchPathDirectory
 	public let errorReceiver: ErrorReceiver
 	private let group: dispatch_group_t
 	private var createdDirectoryURL: NSURL?
 	
-	public init(var pathComponents: [String], inUserDirectory directoryBase: NSSearchPathDirectory, errorReceiver: ErrorReceiver, useBundleIdentifier: Bool = true) {
+	public init(pathComponents: [String], inUserDirectory directoryBase: NSSearchPathDirectory, errorReceiver: ErrorReceiver, useBundleIdentifier: Bool = true) {
+		var pathComponents = pathComponents
 		if useBundleIdentifier {
 			if let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier {
 				pathComponents.insert(bundleIdentifier, atIndex: 0)

				// Convert components back into a URL.
				guard let directoryURL = NSURL.fileURLWithPathComponents(pathComponents) else { return }
				
				try fm.createDirectoryAtURL(directoryURL, withIntermediateDirectories:true, attributes:nil)
				
				self.createdDirectoryURL = directoryURL
			}

		}
	}
	
	public func useOnQueue(queue: dispatch_queue_t, closure: (directoryURL: NSURL) -> ()) {
		dispatch_group_notify(group, queue) {
			if let createdDirectoryURL = self.createdDirectoryURL {
				closure(directoryURL: createdDirectoryURL)
