In a medium sauté pan, heat oil over medium heat. Add onions and cook until browned, about 10 minutes. Add sausage and cook until browned, about 5-8 minutes.
Cook potatoes in boiling water until tender. Drain water and place in a medium-sized bowl.
Mash potatoes and add sausage-onion mixture. Mash well to combine. Taste and adjust seasoning if necessary. Allow to cool completely.
Place about 3 tablespoons filling onto each pastry square. Fold over to form a triangle and use the edge of a fork to seal the edges.
Place the bourekas on a greased baking sheet and brush with egg. Sprinkle with sesame seeds if desired and bake in a pre-heated 400° oven until golden brown, about 20 minutes.
Serve warm or at room temperature.
As seen in the Joy of Kosher with Jamie Geller Magazine