Image_manager:Remove temporary untar image dir

When trying to upload same version image, object path for version is not
created. So it should delete the "/tmp/images/imageXXXXXX" directory.
If trying to upload different version image, it should be renaming the
temp directory to image version ID and create the version object path.

Tested:

case1: Uploaded the same version functional state image.
case2: Uploaded the same version ready state image.
case3: Activate the image without reboot bmc, then uploaded
       the same version active state image.
All the above cases failed to upload and image files
directory are not available in /tmp/images

Signed-off-by: Selvaganapathi M <selvaganapathim@ami.com>
Change-Id: I9809fa857c2345207581413024d0d80a813aa8f6
1 file changed