Bug fixes for the tool to generate luabindings.
Merge pull request #2949 from dumganhar/develop

Bug fixes for the tool to generate luabindings.