Line 2 baking sheets with parchment paper. Place 1 sheet of puff pasty on each baking sheet. Cut each sheet of puff pastry into 9 individual squares, each about 3 by 3 inches. For each square, use a paring knife to cut from each corner toward the center, stopping 1-inch from the center. You will have a 1-inch circle in the center of each square, and all of the corners will be cut in half. Spoon about 1 teaspoon of pesto in the center of each square and spread it into a 1-inch circle. For each square, lift one half of a corner and fold it toward the center of the square, gently pushing the point into the pesto. Continuing around the square, fold 3 more corner halves toward the center of the square, and gently press all 4 tips together to form a pinwheel shape. Draining away most of the oil, place about 1 teaspoon of the tomatoes where the tips meet. Brush the dough with the beaten egg. Bake at 350 degrees F until the dough is golden brown, about 20 minutes. Serve warm.