最後にdispatchMain()を追加して明示的にexit()すればいいみたい
http://stackoverflow.com/questions/31944011/how-to-prevent-a-command-line-tool-from-exiting-before-asynchronous-operation-co

#! /usr/bin/env swift
import Foundation

var dic: Any = ["": ""]

func printJSON(_ data: Data) {
do {
let json = try JSONSerialization.jsonObject(with: data, options: .allowFragments)
dic = json
print(json)
} catch {
print("parse error!")
}

}

let url = URL(string: "http://date.jsontest.com/";)!
let task = URLSession.shared.dataTask(with: url, completionHandler: { data, response, error in
if let jsonData = data {
printJSON(jsonData)
DispatchQueue.main.async(execute: {print("dic = ¥(dic)"); exit(EXIT_SUCCESS)})
}
})

task.resume()
print("OK")
dispatchMain()