Backend: Fix support of documents with unusual names

Signed-off-by: Jerome Flesch <jflesch@gmail.com>