Double percent encode escaped values.

The string is eventually passed to printf, so we need to add additional
percent symbols, through two levels of escaping.

Closes #22.