Prevent filename-ext from throwing NPE on empty (:uri request)

Wrapped filename argument in str fn call to return an empty string on nil thereby preventing unnecessary NPE. This make it possible to use in a chain of middleware without disrupting the normal flow.