Correctly escape prompts for bash and zsh.

Fixes #43.