Return a CommandResult object instead of Hash

This fixes compatibility with SpecInfra 0.5.9 and newer.