Added workarounds for pyparted bug and exception handling for disk.commit()