Escape prompt expansion arguments in precmd before setting title.

The arguments passed to precmd that are used to set the title ($2 and $CMD) were not properly being escaped for prompt expansion. Fixes issue #342.