fixing mainDirs for multi-executables
fixing mainDirs for multi-executables