fall back to label if filename hasn't been set
Created by: whunter
When exporting files, if filename wasn't set it was basically trying to write file content to a directory since filename was nil. This change allows it to fall back to label, which is set to the file's original name at upload.