Fixes #3 memory leak (3 lua_State were not being closed)
adding gitignore file with .swp and .o
minor code style fix (two if-else using brackets)