use write mode instead of append when uploading

When performing an upload one expects the new file to replace
the old file instead of appending to it.