Fix buffer overflow when reading string from R_TextureNameForNum into Lua
"Strings" coming from R_TextureNameForNum
are all 8 byte blocks with no guaranteed NULL-termination, so passing it directly into Lua won't work. Copying it into a 9-byte buffer first and appending a NULL character at the end fixes the problem.
Fixes #1341