I've investigated further. It appears to be a problem specific to windows machines. Yes,I know. I have a linux machine (where mermaid works just fine), but I'd also like to get it running on windows.
The problem appears to be that the diagram extension saves the generated image as a temp file that is then copied to the "imagesoutdir". Unfortunately, because of the way Ruby handles files on windows, the generated file is garbage collected (i.e, deleted) before it can be copied to the output folder. As a result, the conversion process fails. I am not versed enough in Ruby to understand how to correct this. One way or another, there must be a way for the generated png to kept long enough for the copy operation. Anyone have any ideas?