xbps-rindex(8): fix #24 and added an ATF test case.