Basic file functions for Lua.