Fix location-header for documents with newlines in the name

COUCHDB-708