save_panels() saves "panels.new" and renames it to "panels" for safety.