Don't crash when a file diff contains utf-8 chars

This fixes a crash when the client tries to render the diff of a file
which includes unicode characters. This change assumes that utf-8 is the
default encoding, which looking at the rest of the code appears to be a
safe bet.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Merge branch 'utf8-fixes' of https://github.com/stgraber/bcfg2 into maint