Avoid writing of files in Windows encoding on Windows instead of UTF-8

Pandoc requires UTF-8. codecs.open would however select the standard windows
encoding on windows and hence results in a crash when running matuc master.
Merge branch 'master' of github.com:humenda/AGSBS-infrastructure