Add 3.4/3.5 compatible def.dir_masterfiles

Fix incompatibility with 3.4/3.5 introduced in 6733bf5499b2b7118bb8244b1636a349db32e1c9