Fix a bug which prevents pyramid_frontend.template_imports from working: need to pass flatten=False to aslist(), or else the value will be whitespace-split
Don't escape interpolated variables when rendering a .txt template
Add a legacy fallback to handle image URLs that are missing the original ext