Record last exit code before running anything

Otherwise powerline receieves value from the previous command in 
`_powerline_prompt` function.