save history in python repl across sessions

Before this change when you would exit out of the python interactive
shell your history would vanish.  This change saves it to a file so the
next time you go into the python shell you can hit <up> and see your
history.