Refactor: test: Add CIB-related single unit test setup code.
This function takes a CIB input file and copies it to a temp location so
the unit test can modify it, without modifying the original. This lets
multiple unit tests start with the same CIB and do whatever they need
without interfering with later tests.
This is not the complete setup function - you should call this from
whatever setup function you have in your unit tests. Making a truly
generic setup function is difficult because it requires passing a state
object around, which could vary between unit test groups. Splitting
this part out gets us most of the way there.