Test script creates tmp and lock if necessary.