LaTeX writer: Properly escape pdftitle, pdfauthor.

Closes #1059.