Refactor to use librpm and fallback to cmd

This is a take on issue #27. We try to load the rpm package, and we check for it's existence in the global space when determining if we want to use lib rpm or fallback to calling the command.