Merge pull request #1 from LuaDist/master

merge changes from luadist
Fixed templates
Fixed rocks file
Fixed code for Lua 5.2. No more declaration in global.
Releasing 1.0.2 compatible with Lua 5.2.
Using exit status -1 on test failure.
Using travis to run tests on commit
Documented Test return and adding build flag
Fixed testing and cross-compilation checking.
Merged in from upstream