Move common stuff in ScriptFile, add MAGIC_LOAD_TEXTURE and MAGIC_DISPLAY, initial MapFile support