MDL-44501 mod_data: Only attempt to export files when a file exists.

The error only occurs when portfolios are enabled and there is only one field which is
a file field.