Improved a few error messages slightly.
Removed unnecessary cout imbuing.
Fixed plugin header strings not converted to UTF-8.

Fixes #317.