Fixes to examples/tinsh.lua.

Handle errors if posix.execp() fails
Added error printing functions.