.bash_prompt: Interpret escape sequences correctly in all cases

Closes #407.