Improve unexpected length error message.

go vet pointed out that the Sprintf function wasn't using all its args.

Also switch from errors.New(fmt.Sprintf(...)) to fmt.Errorf(...)