Added error option to enable custom error handling

This error handler is only called when the session save/destroy methods are called via the middleware.

This has enabled us to log these errors with our choice of logging tool.

Hopefully this is useful. Appreciate any feedback.
I've updated to match the style. Thanks for catching that.