Excited state chemistry of indigoid dyes: 5. The intermediacy of the triplet state in the direct photoisomerization and the effect of substituents