pkg/lock: add DirLock tests