Fix cg2glsl batch when dir has slash suffix.