backport-1.7-3953

Backport #3953: `MAINT: io: handle a bad fmt argument in savetxt by raising a ValueError.`