- expired flags are now sorted by directory -> file
- minor test improvements