libzip api cleanup around file pointers