gh-27: save todo at cleanup
FIX: fix missed issue

probably unrelated to the defect, but still serious omission
TEST: test for gh-28
TEST FIXUP: proper check
TEST: also test proper todo
FIX: apparently Perl initialises array at accessing undef as a reference.

Check existence explicitly
FIX: one more perl misfeature
gh-28: fixed