More progress on libkpm's getPackageList

Currently blocked by bugs in free(3)