slugify document filename for compatibilty with x-sendfile
fix unittesting downloads