Fixes for #926 (closed). This:
- fixes code messed up in a merge that wasn't letting JATS download correctly
- correctly reports errors if the JATS doesn't download correctly.
- fixes some possible JATS validation errors in code coming out of Wax.
- fixes messed up code that wasn't allowing the print PDF to download correctly.
4 is a partial fix: there's some file code in there from Vignesh that I've turned off to make this work. That was firing too soon and deleting files before the PDF came back, causing an error; I don't know the code, so I haven't changed it beyond commenting out the line. The side effect of this is a bunch of PDFs piling up on the server and not getting cleaned out; but I thought it best to get a fix out.