repo: Repo.cachedir is not a list.

And librepo does not like inflicting a non-list on Handle.urls. In fact,
Python displays deprecation warnings with -Wall.
fix PendingDepreaction warning from rpm in _getsysver().
fix: leak: couple of files objects left open.

Found with -Wall.
fix: resource leak in yum.misc.checksum() under py3.