From #4 Mostly a batch implementation of `write-test`. We don't separate writing a new test from updating a one if it exists.