Remove redundant "open" which causes TypeErrors.
Specify the charset in the content-type to fix apostrophe, etc. mojibake.