Add parens on generated S patterns

This fixes an issue where generated S patterns would sometimes not be
parenthesized, leading to invalid patterns being generated. This
occurred even in tutorial code, like Parity.
Merge pull request #1379 from david-christiansen/paren-S-pat

Add parens on generated S patterns