They are spot welded on, you can gently prise them off, file them flat, and then solder them (or spot weld) back to the new batteries. We used to solder such batteries at work, until I ordered a small spot welding machine - if soldering them, then make sure the ends of the battery are clean, use abrasive paper to clean them up, and then tin the battery ends before soldering the terminals, and fuse, to them. If you've got some liquid or paste flux, applying that to the ends helps as well.
Try and put as little heat in the batteries as you can, use a hot iron (with a decent size bit) for a short time, rather than a cooler iron that needs applying for a lot longer.