Fix for not clearing the list of files in uplaoding dialog.

References #504.