Merge pull request #168 from nulltoken/isolate_refs_tests. Isolate "writing" refs tests in a temporary folder