Fix: no matching socket for script packet

Commit 4d1122bd introduced packet_encapsulate called when parsing the
script file. The issue was caused by the fact that the packet used
after packet_encapsulate did not have the same value of socket_script_fd
as the original packet.

Signed-off-by: Gregory Detal <gregory.detal@uclouvain.be>