I disagree with the finding that it behaves the same on the Mac.
At least on Ubuntu it just worked as advertised no renaming or removing of files requuired.
On the Mac it creates a duplicate file with again duplicate content.
For me the manual process by as shown above was what worked.