Removed some unused variables

I was testing [luacheck](https://github.com/mpeterv/luacheck) on luarocks and found some unused/unnecessarily redefined local variables.