1. Preheat the oven to 350 F (175 C). In a large bowl mix flour, sugar, baking powder and salt.
2. Add cubes of butter and cream cheese and incorporate with a pastry blender or pulse in a food processor until the mixture resembles coarse crumbs.
3. In a small bowl beat the egg and vanilla extract.
4. Add the wet mixture to the dry one and form into a dough. You may need to add orange juice or water to bind the dough. Add the liquid sparingly.
5. Divide the dough into two and flatten each into a disk. Refrigerate for one hour or overnight.
6. On a floured surface knead the dough to further incorporate butter and cream cheese cubes.
7. Roll out dough to a 1/4 inch thickness and use a 3 inch circle (or fluted circle) cookie cutter to produce rounds. Re-roll scraps and make as many additional rounds as possible.
8. Put one teaspoon of preserve in the center of each round. If you overfill, the preserve may bubble over during baking. Form into a triangle shape by folding three edges up and pinching in three corners. During baking these corners often unfurl, so make sure you have closed the seams well (while leaving the preserve exposed).
9. Bake for 15-18 minutes or until light golden brown. Check the cookies after 2 or 3 minutes in case the edges unfurl. If this occurs, immediately remove cookies from the oven and reseal the corners. Do this with each batch to ensure that the cookies keep their shape.
10. Hamantaschen can be stored in an airtight container for up to one week.

Notes

In pinching the corners, really really exaggerate it. I had the best luck when I pulled the points out far, folded them over top-wise, and folded them again side-wise. (If that makes any sense).