Added tests. Fixed a few strange things in luacheck.scan