[tweaked by apenwarr to remove dependency on non-portable /usr/bin/stat]
It was getting way too ad-hoc in there. Let's reorganize the tests so that there's a good, obvious, suggested sequence to run them in.