make pygmalion theme use two lines when needed

if the length of the prompt (excluding color escapes) exceeds 40
characters, emit the arrow prompt on its own line

This helps a lot on smaller terminals
correctly handle path names with spaces
Merge pull request #781 from pilif/two-lined-pygmalion

make pygmalion theme use two lines when needed