Clean up local variable usage - upload_image()

Cleans up the rather coplex upload_image() function

Change-Id: Ie1ef200b905dd5d17ef887390d620817208f2bf5
Merge "Clean up local variable usage - upload_image()"
Merge commit 'refs/changes/83/86083/2' of git://gold.eng.hq.xensource.com/git/github/openstack-dev/devstack into tmpbranch