Fixes file not found errors when running scenario tests in VS

Ensure the directory you're writing a resource to exists. This fixes failures when running the scenario tests (and a few other spots) from Visual Studio.