Working code for convenient creation of Lua resource files