Add exit code
Correctly handle ---[[ in Lua. Closes #2.
Add regression tests