Minor fixes

 - Ensure we properly drop temp resources
 - Dispose a test `Repository` instance