Fixed bug where if encoding was set in the config file it wasn't used,
it had to be set in app.pm->config