Specify the encoding when reading files.

In Ruby 1.9, we have to specify the encoding explicitly because the
magic comment doesn't change the default external encoding (US-ASCII).