Fixes issue #150.

Failed ingest of Bibl 15350 on Aug 21/22 2013 showed that the
existing code was capable of producing bad CGI escaped text, as it
was possible to trim of the numbers following a '%', which would cause
many HTTP handlers to choke.  New method trims, then escapes.
Merge branch 'issue-150' into development