[core] Make terminal a str, not unicode

This seems to fix a unicode issue which appears to stem from
a1fd1dc4811dce45f466e8a2a556607a65988471 and may be the cause of #440.