Try to open history file and catch errors.

Instead of checking for the file with os.path.isfile(), try to
open the history file and catch IOErrors.

Only add the readline history exit handler if the history file
opened successfully.

Altered the message to not mention session history if the history
file fails to open.