bibdocfile: better error report for unknown format
- When an unknown format for a bibdocfile is requested an exception was registered (and an email was sent to the admins), even when no referer was specified in the HTTP headers, thus cluttering error reports in case of malicious users playing with the system. This commit improves the check for unknown formats earlier avoiding the exception to be registered, when no referer is set.