Add support for local functions in Lua

With this change both `function foo()...` and `local function foo()` will
trigger the addition of an `end`.
Merge pull request #52 from telemachus/lua-local-funcs

Add support for local functions in Lua