     return counts.map{"\($0.value) \($0.value == 1 ? $0.key : "\($0.key)s")"}.joined(separator: ", ")
 }
 
-func isReadable(path: Path) -> Path {
-    if !path.isReadable {
-        writeError("'\(path)' does not exist or is not readable.")
-        exit(EXIT_FAILURE)
-    }
-    return path
-}
-
 func optionsValidator(string: String) -> String {
     if !string.isEmpty && !string.contains(":") {
         writeError("Options arguement '\(string)' must be comma delimited and the name and value must be seperated by a colon")


    let templateConfig: TemplateConfig
    do {
        templateConfig = try TemplateConfig(path: templatePath, options: optionsDictionary)
    } catch let error {
        writeError("Error loading template: \(error)")
        exit(EXIT_FAILURE)

}

command(
    Option("template", "", flag: "t", description: "The path to the template json file"),
    Option("destination", Path.current + "generated", flag: "d", description: "The directory where the generated files will be created"),
    Option("spec", "", flag: "s", description: "The path or url to a swagger spec json file"),
    Flag("clean", description: "Whether the destination directory will be cleared before generating", default: false),
