make Lua use mkstemp() instead of tmpnam()

This allows compilation without warnings on recent gccs (e.g. the default gcc in Ubuntu 13.10)