Dice the onion to small pieces, and fry until translucent. Mix all of the filling ingredients together.
Roll out the puff pasty, and cut into square/rectangular shapes. Place the filling in each one (about 8 in total), and brush all 4 sides of the square with egg wash. Close the pastry into a triangular pocket. Brush with egg wash and sprinkle sesame seeds.
Bake on 450F for 8 minutes, and then lower the heat to 350F and bake a few more minutes until ready.