Ongoing reference work

Write out a single reference string instead of separate id and path.  Add helper overloads to enable automatic escaping when needed.  Still need documentation, tests, and actual value escaping.