Added missing lua headers to prevent implicit-declaration warnings.
Fixed error messages.
Proper error display, when calling into Lua from C.