Destroy locks on exit from test/format.