Simplify, clean up and tidy TargetDirectory.
Ensure that long test names do not hit Windows path length limit.

o The Windows path length limit is 260 characters.
o The names of parameterized tests include the values of the parameters which
   can make them very long.
o This fix uses digests of the names for test directories rather than the names
   themselves to avoid the limit. We record the mapping so that we can do a look-
   up in case of test failure.
Merge pull request #1387 from benbc/2.0-test-directory-paths-shorter

Avoid Windows path length limit for test directories