Fix some readline issues with backdoor client

- python prompt was confusing some readline commands
- save/restore readline history