7z: improved valid(), removed many FIXMEs