Fix Image#write erasing file with same path