fix stupid bug in prevalidator, fix some tests, fix incompatibility with the new swift DiskFile interface