Fix #354: support slash in key names

Quote 'key.name' properly when used in URL path / query string.

Fixes #354.
The variable defined right before this lines up the `}` with the beginning of the variable name. Can we be consistent?