Only store a non-empty python history...

...since somehow reading an empty one fails!