Don't clobber $HISTSIZE and $SAVEHIST

The existing code was clobbering $HISTSIZE and $SAVEHIST, switch to only setting them if they're unset