Completed test.c, hardened dllist.c, dllist.h

Hardened dllist.c against malformed lists, updated test.c with
new test cases to handle those possibilities.