Make tests which use wc more robust.