Fixing a regression in metadata write-out caused by the fix to #26
Fixed a bug where deleting numeric tags failed to be written to the original file.
Adding a cute little purge function that destroys metadata records when they're empty.