Make concatenating certs robust in urls.py

Add a newline after each certificate file explicitly to avoid problems with files that do not end with a newline themselves.

Fixes issue #7218.