What's the best way to get flies out of that thing without them escaping? I know you can fridge them for a bit and that will cause them to settle...apart from that I don't have any ideas.
Easiest way is to use an "aspirator," a trick I learned in undergraduate Drosophila lab. Take a plastic medicine dropper and cut off the "bulb" end (you may have to cut the tapered end a bit also if the tip is too small to accomodate your flies), and cut a small piece of cloth to fit over the cut end. (Pieces of old cotton underwear or t-shirts are perfect.) Then insert a piece of aquarium airline tubing into the cut "bulb" end, with the cloth in between. (Hope the description is somewhat clear ... it would be easier to just post a picture, but I haven't figured that out yet....) Then suck the flies up by mouth through the aquarium tubing with the tip of the dropper. The bit of cloth keeps them from getting sucked into the airline tube and into your mouth, so they collect in the dropper. You can then puff them out into your terrariums, or even suck up a bit of calcium powder (suck very gently, because the dust does get through the cloth, and is unpleasant) and shake the dropper so the flies are nicely coated with calcium.
Open the top of the jar just slightly and the flies will swarm up toward the opening. If it's a plastic tub, the top is flexible so you can open just a small bit (but you'll have to watch for flies getting in under the rim and being crushed when you close it again ... it can be a bit of a trick to suck them up out of that groove). I use small glass jars with rubber-banded cloth covers, and I just pull back the cover on a small section. A few flies will always get out, but since they are flightless they don't get far, and you can just suck them up from the floor through the aspirator.
This device also works beautifully for pinhead crickets.