Track opened/read files internally in Lua.

Fixes GH-158