Add locking for each test

Summary: We've talked about problems when the same test is run many times in parallel. In repo mode it is almost certainly going to fail. Adding file level locking should solve this problem.

In my incredibly unscientific tests, this doesn't add any extra time over not having it. 1 minute 8 seconds average over 10 runs with and without it.

Reviewed By: @markw65

Differential Revision: D1474426