Preheat the oven to 350ºF. Grease a 9 x 13-inch pan. Place a piece of parchment in the pan that is large enough to go up the sides and hang over a few inches. Grease the top and sides of the parchment.
To make the crust: Place the flour and sugar into the bowl of a food processor fitted with a metal blade. Process for 10 seconds. Cut the margarine or butter into pieces and add to the bowl. Process or use your hands to mix for another 10 seconds. Add the vanilla and egg yolk and then process or mix until the dough just comes together.
Divide the dough in half, making one piece a little bigger. Wrap both pieces in plastic; flatten and place the smaller one in the freezer. Take the larger piece and break it into pieces and scatter over the parchment. Press the pieces into the pan as evenly as you can. Place in the oven and bake for 15 minutes. Remove from the oven and let cool for 15 minutes.
Meanwhile place the raspberries and blueberries into a large bowl and squeeze with your hands to break up the raspberries.
Add the sugar and flour and squeeze together. This part is fun, but you may still want to use plastic gloves as I did. Remove the other dough piece from the freezer and, using the large holes of a box grater, grate the remaining dough over the filling.
Bake for 50 minutes, or until the top starts to look golden brown. Let cool. Trim off about ¼ inch of the sides, if desired, and eat them immediately, and then cut into squares or long bars. Serve warm or cold.