Some helper functions to write command line scripts with Swift.