One-loop singular behaviour of QCD and SUSY QCD amplitudes with massive partons