This patch makes 2 unrelated improvements:
1. Add the "-enc UTF-8" option to the pdftotext command to produce Unicode text; the default is Latin-1. This has been tested successfully with Greek text.
2. Improve error reporting by testing status value. E.g. pdftotext returns 3 when it fails because of a permission problem in the source PDF, which is useful information that leads straight to a diagnosis.