Make executor emulate putchar

Fixes #1056.
Merge pull request #1177 from david-christiansen/issue/1056

Make executor emulate putchar