The CN/C$^15$N isotopic ratio towards dark clouds