The problem is that, although the machine makes a perfect right angle, the filament appears to have a minimum bend radius and so cuts the corner. The amount it cuts the corner seems to vary from layer to layer giving rise to the rough edge.
I think the variation is due to the fact that my extruder spindle is a bit off centre. This causes the torque to go up and down as it rotates, which causes the flexible drive cable to wind up and run down again. This causes speed variations despite the fact that the motor speed is well regulated. At some point I will get rid of the flexible drive.
I expect the fact that I am stretching the filament doesn't help with the corner cutting. I improved it a lot by slowing down the drawing of the outline to 4mm/s and leaving the infill at 16mm/s. Here is the result :-
Still not perfect, another thing to try would be to recognise that there is a minimum corner radius and make the nozzle follow an arc of that radius around the corner. At least that way it might be more uniform.
Here is a close up of the top face taken with a scanner:-

As it goes round the corner the filament has an external radius of about 1.5mm and an internal radius of 0.9mm. As it is 0.6mm wide that is probably not bad. You can also see that the zigzag infill sometimes ends a bit short of the edge, probably also due to corner cutting.
To get sharper corners I expect I need to use a nozzle with a smaller hole, so that the filament can be fine without having to be stretched, but that has the disadvantage of slowing down the extrusion rate for a given pressure.