Fix the test to make sure the dir exists.

The mock was masking a real issue.