Create the intermediate directory if required

If the output file for a reporter is in a directory that doesn't yet exist, then the intermediate directories are not created. This commit fixes that. It's useful for when you are running this on a build server which spits out results into a directory within the source repository, but you don't / can't have that directory committed to the repository.