Tweaked JobWrite to support multiple lines in the XML file.

Also cleaned up JobDownload and THFile from the previous commit.