core: cleanup: remove unnecessary variable and ifs

BaseImagesCommand.getImage() used unnecessary auxiliary variable and if
statements for class member mImage assignment, and now only uses class
member mImage.

Change-Id: If4ce2493c4cda5bc851aafb7a1abdc2dba9a99b5
Signed-off-by: Vered Volansky <vvolansk@redhat.com>