Made changes to osd setup code to support loop device

Loopback device will be used to automatically generate disks for testing.

Loop devices have different naming scheme for the partitions
Partition 1 on /dev/sda is /dev/sda1 and 2 is /dev/sda2, but in case of
loop device, partition1 of /dev/loop0 is /dev/loop0p1 and 2 is /dev/loop0p2.
So changes are required to set proper partition names.
can you document this inline? It is definitely not obvious form just reading the code