Ensure that function arguments are always properly surrounded by curlies.

Refactor the `curlies` functions so that they can't be fooled by giving
them text like "{...}{...}" (ie, starts with "{" and ends with "}" but not
an atomic argument).  This is sufficient to ensure that we can parse
the validated output for every enwiki test case.