Improved libespm error handling.