with_mock_dir function

Use or create mock files depending on their existence