FIX: Follow internal redirections for cli operations.
Merge pull request #2423 from wilr/cliredirects

FIX: Follow internal redirections for cli operations.