Fixes to parted.py module

Adding some checks to ensure binaries called via cmd.run are available. Per #15948.