Move some general-purpose utilities into lib/util.js.
Test generic printing of expressions that require parentheses.