test: return the iteration number to the end of the test path

When we generate a path to the previous images, we take a directory name
and the previous iteration number.

Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>