Catch exceptions when modifying the ramdisk

The ramdisk scripts don't do any error checking (which for 99% of the
time is fine), but with the new multi-device support, choosing the
wrong device would likely make it crash.