Well, for square corners: Get Square Corners on a Stroke That ... it's a bit of a workaround, but should work!