TST make tests more robust to bad config

This fixes all the Windows issues (with Hg and stuff).  #64 #57 #66 etc.

cc @schodge :bowtie: