Fix for getpelican/pelican#1198

When rendering templates, the locale was set to C in getpelican/pelican@ddcccfeaa952d2e1e24ceac94e5d66c73b57c01b

If one used a locale that made use of unicode characters (like et_EE.UTF-8)
the files on disk would be in correct locale while links would be to C.

Works with Python3, gives ascii decoding errors with Python2