Fix garbled output from error documents. Closes #12.