Enhance error message when reading binary input files

Resolves #1158 

I don't know if this is the good approach but the error message is more useful:
```
/home/mogztter/bad.pdf: invalid byte sequence in UTF-8
  Use --trace for backtrace
```