barclamp_mgmt_lib: Fix crash when using --rpm mode

IO.popen() doesn't set $?, so we use `foo` to execute a command instead.