This change allows for the capture of the expanded prompt (rather than the raw `PS1`) so that it is easier to maintain context when changing directories. Fix is based on the comments from [this stackoverflow](http://stackoverflow.com/a/24006864)