[tests] lock test temp. dir handling extracted; precondition added (IDEA-CR-4345)

No match.