cli: fix calculation in the I/O 'complete' loop

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
sparse_dd: fix URI scheme rewriter

This is needed to upgrade/downgrade to/from TLS

Signed-off-by: David Scott <dave.scott@eu.citrix.com>