Attaching patch 1a, which replaces a set of characters from the string returned by TestCase.getName().
I suspect the list isn't exhaustive, but it may already include characters that are allowed in some file system. The point here is just to make sure the directory creation works. In my case it failed due to putting '<>' in a test name (compatibility test).
More characters that should go in?
Is there perhaps a method in the Java-API that will remove illegal chars?
Patch ready for review.