Fix the test to make sure the dir exists.

The mocking was masking a real issue with the directory not existing.