For a vegetarian alternative replace the cooked ham with 225g sliced brown cap mushrooms which have been fried in butter until golden. Allow to cool before mixing with the cheese. This pie is also delicious served with a homemade tomato sauce.
Heat half the butter in a large frying pan and cook the onions and garlic over a gentle heat with the rosemary for a good 10-12 minutes or until very soft. Stir in the crème fraiche, remove from the heat and cool.
While the onions are cooking, squeeze the liquid from the spinach and stir over a low heat until it is completely dry. Roughly chop, season with salt, pepper and ground nutmeg.
Melt the remaining butter and lightly grease a 23 cm base measurement, 3cm deep loose based flat tin. Line with sheets of filo pastry, brushing with butter between the layers and overlapping them in a random manner. There should be no gaps in the pastry and the excess pastry should hang over the sides of the tin. (Remember to keep the filo covered with cling film whilst lining the tin, as filo dries out very quickly once exposed to the air and then becomes difficult to work with.)
Lay across the bottom of the pastry the sliced ham. Spoon in the cooled spinach, top with the onions, then the crumbled cheese. Wrap over the pastry to enclose the filling. Brush with egg and sprinkle with sesame seeds.
Put a baking sheet in the oven to heat up. Place the pie on top and cook at 190°C (375°F) mark 5 for about 45 minutes, cover lightly with foil after about 20 minutes so it doesn’t over brown. Cool for 10 minutes before turning out and serving. Serve with a tomato and olive salad.