If exportFileName hook isn’t defined don’t return empty filename.

This commit should fix #2251.

If ``exportFileName`` hook is not defined, ``hookFileName`` should be an empty array. Test the length of ``hookFileName`` before overriding ``fileName``, the export filename.
Merge pull request #2252 from otetard/bugfix/fix_export_filename

If exportFileName hook isn’t defined don’t return empty filename.