Move function outside of loop

Oops, had sevenzip_wrapper function defined inside a loop. Moved.