The temp file is now unique and the file is correctly deleted

The temporary file is created using the File.createTempFile method to
avoid the potential overwriting if more than one users try to upload a
file simultaneously. Also the file is now deleted in a finally clause
to delete it even if an exception is thrown.