Get tests passing on Windows

I'm hoping to use dendrite on some windows machines.  The first of these commits is "just enough" to get the tests passing.  The rest are relevant and seem like good ideas to me.  I'd be happy to rebase this work differently or drop the non-essential changes, just let me know what you'd prefer.