Add tests checking the behavior when uploading two files and fix two bugs
The two bugs were:
- Ensure we run update the checksums only once, even if we upload two
files, otherwise, the first file uploaded ends up twice in the
checksums file.
- Ensure we do not write twice the header line when uploading two files
to a project that did not have a checksums file before.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>