api.lua: *always* close() io.popen calls in order to avoid really freaking weired bugs