Fix non use of HISET_DIR in multiple places including actually setting it
Try calling history -a only when changing hiset session as opposed to exporting the history command as history -a
ensure the new history gets loaded when changing sessions, ensure the directory for history files has been created