Preheat the oven to 425°F (220°C).
In a large bowl, combine flour, baking powder, and salt.
Cut in the cold butter until the mixture resembles coarse crumbs.
Stir in the buttermilk until just combined.
Turn the dough out onto a floured surface and pat it into a rectangle.
Fold the dough over itself two or three times, then roll it out to fit a pie dish.
Place the rolled-out dough into the pie dish.
Prepare the sausage gravy in a skillet over medium heat.
Sprinkle flour over the cooked sausage and stir to combine.
Gradually add milk, stirring continuously until thickened.
Season the gravy with black pepper and cayenne pepper, if using.
Pour the gravy into the prepared pie crust.
Roll out the remaining dough for a top crust and cover the pie.
Brush the top crust with beaten egg.
Bake for 25-30 minutes, or until golden brown.
Allow the pie to cool slightly before serving.