Finalize tree writing
Move files to top level