Regarding the spec failures, I think that if you add `Dir.stubs(:entries).with('/var/opkg-lists/').returns 3` in this `before` block, the tests should be fixed.