Improve transform.

* Make it close the source file after it has finished reading.
* Run in parallel when the file are supplied via the command line.