Tweaking prompt handling

Now uses PROMPT_COMMAND to make sure things are kept up to date, also checks virtualenv status and adds line-reset escape sequence