Fix LuaJIT exception wrapper
Add lua exception handling test code
Catch some error situations when mod used without thinking about it