Added support for saving pane history
Modified how cwd detection works