packet.lua: Added missing require("freelist")
link.lua: Added a real selftest() function.