Add bash history saving and restoring (first version).