views.py: Make sure that the filename is not empty when using unidecode.

TestViews.test_pdf_response test was failing when unidecode is installed for
the reason explained in a comment.