I'm going to say you should not punish her. This is more likely an attention getting effort and although your attention is negative, they get a charge out of it. See she percieves she's getting the same/equal to/ attention that the baby is still getting and the new baby will have when it arrives. This is not uncommon when there's a new baby in the house.
Here's a website that lists the four goals of misbehavior: http://www.lifematters.com/step.asp
When you know what she's trying to get by you then you're better equipped to handle it.
Most often that class says to offer choices you can (do this) or you can (do this) in an effort to redirect her. But then there's the times when she has to chose between fun or punishment.
However that's not what you should do about this. Take her to the bathroom with out speaking to her at all. turn her back to you strip her of the wet clothes with no talk and no eye contact. Hand her the dry clothes, tell her to "put them on" and walk away with the wet clothes. Be as emotionless as possible.
I did this when my middle boy back slid when I brought the youngest one home and I'm doing it now for the youngest one who still poops in his pants. It really does work.
PLUS you can use the potty training technique of setting a timer and just taking her to the potty every 20 minutes for a couple of days, then asking her if she needs to go every 20 minutes for the next week then increase the intervals. Consider a reward for when she actually uses the potty. Stickers until she fills up the "page" then she gets something new.