Introduced Repository.tmpDir

As requested. Not sure whether it should just be an instance method on `Repository`, or whether it should be `tmpKey` or something.