Start of code to attach PDF files to revisions - doesn't quite work properly...