Make executor emulate putchar

Fixes #1056.