In my reviews you can see project "Web Site Backup Class". So this class works:
Go thru folder (you give targe in form of some path), goes thrue target foledr, pickup all files and makes zip.
Also goes thrue all files and finds dependencies (images or js files) and pick up those files also.
After that, you can unpack zip file anywhere, and script will work bcs all files are packed. Price for this is $40.
Greetings