No, you weren't in the wrong. What a dreadful situation, it sounds like the whole incident has gone from a tiny thing that needed a simple, quick consequence for the children involved, has blown into a massive issue. Regardless of the child's behaviour yelling at them in front of a class is not appropriate in my book. This whole issue is about bullying and yet the teacher is now the one doing the bullying!
You need to ring the Principal on Monday morning and demand an urgent appointment. To be honest I'd even consider keeping the girls both home til this is sorted, not an ideal thing to do, but it may save them from more stress. If this is how the school deals with a minor teasing issue then that is plain crazy! I seriously doubt this is how it's meant to be dealt with. Meeting with the Principal hopefully will resolve the issue. There may be some parts that have been blown out of proportion/misunderstood/etc and the quicker that can all be sorted out the better for all of you.
I hope it gets sorted quickly and your dd's feel happy about school again.