livecd-iso-to-disk: Fix --efi --format code sequence problems.
The recent rework introduced some bad sequencing and the partition
number failed to be determined.
(This should fix rhbz#1437601 & rhbz#1437601.)
Testing revealed another code sequence problem when changing from
msdos to gpt partitions. (Also fixed.)