Specify encoding when opening files in setup.py

This resolves a UnicodeDecodeError when setup.py is invoked with a
non-utf8 locale.

https://bugs.gentoo.org/show_bug.cgi?id=495118