Fix dirname output on Windows. Remove some leftover in Cover2.