 	/// - Returns: true if this URL represents a directory on the local file system
 	public func directoryExists() -> Bool {
 		guard isFileURL else { return false }
-		if let values = try? resourceValues(forKeys: [.isDirectoryKey]) {
-			return values.isDirectory!
-		}
+		if let rsrcs = try? resourceValues(forKeys: [.isDirectoryKey]), let isDir = rsrcs.isDirectory { return isDir }
 		return false
 	}
 

	public func fileSize() -> Int64 {
		guard self.isFileURL else { return 0 }
		do {
			var rsrc: AnyObject?
			let bridged = self as NSURL
			try bridged.getResourceValue(&rsrc, forKey: URLResourceKey.fileSizeKey)
			if let size = rsrc as? NSNumber {
				return Int64(size.int64Value)
			}
		} catch _ {}
		return 0

	/// - Returns: the localized name
	public func localizedName() -> String {
		var appName: String = (self.deletingPathExtension().lastPathComponent)
		do {
			let rsrcs = try resourceValues(forKeys: [.localizedNameKey])
			if let localName = rsrcs.localizedName {
				appName = localName
			}
			//remove any extension
