fix -border-merge to write new-format border files when possible