Improve the submission phase

Save the file on the hard-drive and if something goes wrong when saving it to
the database, just remove it.

This should prevent issues like when something goes wrong on the filesystem
while the DB went fine and you end up not being able to re-upload to candidate
because there is already one with the same name.