Correctly escape prompts for bash and zsh.

Fixes #43.
Merge pull request #47 from Impromptu/set-prompt

Correctly escape prompts for bash and zsh.