Use an unicode aware context in the jinja render call. Refs #3436
Only `basestring`'s should be `unicode`'d.
Merge pull request #5873 from s0undt3ch/issues/3436-unicode-decode-error

Use an unicode aware context in the jinja render call. Refs #3436