Generate repo database in memory

Python's tarfile can actually generate tarfile's in memory which makes
it possible to remove the terrible chdir/cwd code and do less I/O.
2 jobs for test_memory_tarfile in 37 seconds (queued for 3 seconds)