replace mgm and mtex with pak archive
create directories if necessary