First make the pastry. Put the flour, sugar and salt into a food processor and pulse to mix. add the butter and pulse until the mixture resembles breadcrumbs
Transfer to a bowl and mix just enough iced water to form a dough. Transer to the fridge and chill.
Heat the oven to 170c/325F/gas mark 3. Toss the squash pieces in a little oil and season. Roast on a shallow baking tray for 30 minuites. The squash should be cooked and starting to colour.
Take the squash out of the oven, and add the onion, walnuts, cayenne pepper and sage to the tray and stir well. Season and return to the oven for 5 minuites
When cooled slightly, add the blue cheese and mix
Now for the exciting bit, assembling the pasties. Preheat the oven to 190c/300F/gas mark 5. Roll out the shortcrust pastry to around 1-2mm thick. Cut out circles using a plate around 16cm in diameter as a template. You want to aim to make around 6 circles.
Divide the mixture between the circles. Brush egg around the perimeter of the circle. Bring up each side to meet the middle and seal all the way around. Pinch together with your finger and thumb, or you can use a fancy crimp.
Place on a baking sheet and bake for around 25 minutes or until golden brown.