antirez/redis — pull request #1596 by badboy (2014-03-11 19:16:33+00:00)
Title: Follow cluster redirections in noninteractive mode.

I just used a similar approach as in the interactive repl, just reconnecting to the newly set host/port.
I'm not sure about the "Redirected ..." message. I think it's ok to print this to stdout if cluster mode is enabled.