Heat the butter and oil in a frying pan, add the onion and fry for a few minutes until just beginning to soften, then add the mushrooms and garlic and fry, stirring until golden. Take off the heat, add the thyme leaves and leave to cool.
Roll the pastry out thinly on a lightly floured surface and trim to a 35 cm (14 inch) square, then cut into 16 squares. Spoon the mushroom mixture over the centre of 8 of the squares, then top with crème fraîche and cheese. Brush the edges of the pastry with egg, then cover each with a second pastry square.
Press the edges of the pastry together well and crimp the edges, if liked. Transfer to a baking sheet, then slash the tops with a knife, brush with beaten egg and sprinkle with salt flakes and extra thyme, if liked. Bake in a preheated oven, 200°C (400°F), Gas Mark 6, for 20 minutes until well risen and golden brown. Serve warm with salad.