barclamp_mgmt_lib: Fix crash when using --rpm mode

IO.popen() doesn't set $?, so we use `foo` to execute a command instead.
barclamp_mgmt_lib: Trust rpm if it returns an empty file list

If rpm exits with 0, then we should trust its output.
Merge pull request #1907 from vuntz/fix-rpm

barclamp_mgmt_lib: Fix crash when using --rpm mode