The filling. Heat 2 1/2 tablespoons oil in a large saucepan and cook onions over a low heat, stirring occasionally, until they are soft and just begin to color.
Meanwhile, in a skillet, fry the almonds, using the remaining 1/2 tablespoon oil, until lightly golden. Drain on paper towels and chop coarsely.
When the onions are cooked, add the ginger, cinnamon and the chicken. Season with salt and pepper. Cook, stirring occasionally, until the onions are pale gold, for about 15-20 minutes. Add the cilantro and mix everything together.
The pie. Grease a round baking pan (I used 9-inch) and place a first sheet of filo in it. Brush it entirely with the melted butter pushing the filo into the corners. Let the longer edges hang over the sides. Do the same with 4 more filo sheets, placing every sheet slightly further round so that you have pastry draping over the sides all around the tin. Brush all the sheets with butter, including the ends that overhang.
Spread the chicken and onion mixture evenly and cover it with the overlapping filo. Sprinkle with the chopped almonds.
Lay another filo sheet over the top, brush it with butter, and lay one more filo sheet on top of that. Don't brush the last sheet with the melted butter. Tuck the overhanging edges into the sides of the pan around the pie.
Preheat an oven to 350°F (175°C). Brush the top of the pie with egg yolk mixed with a drop of water. Bake for 30-40 minutes, until it is puffed up and golden.
Dust the top with confectioner's sugar and cinnamon, making a geometric pattern. Enjoy!