Don't use full file name in regex

It may contain regex meta characters, which would cause test failures.
Use fresh scratch dir in directory traversal test

Otherwise, a 'file exists error' may trigger first.