Handle unicode in the config file.

Fix #2481.
Fix for Python 2.x
Merge pull request #2489 from mdboom/config/encoding

Handle unicode in the config file.