checkout: Fix leak when doing uncompressed cache + copying checkouts

We were reading into "input" twice, leading a fd.  This was
breaking the gnome-continuous integrationtest.