Fixed bugs for flashing recovery and boot imgs

Fixed bugs for flashing recovery and boot imgs
(Fixed when no file was selected, it would still try to flash.