Fix term.isatty
Fix term.isatty

Pass '1' instead of '-1' to luaL_checkudata when getting the file
argument to use the first argument, not the last. Error messages generated
by luaL_checkudata are improved.

Also, this happens to fix a crash on Lua 5.1.0 caused by a Lua bug.

hoelzro/lua-term