I'm only a novice when it comes to scripting and am using ATV rather than PLi currently. The latest files on the Git do work but still give error messages on building an image. It seems my busybox doesn't like the ls -e argument, so I've just taken them out. It gives another error towards the end, seems it doesn't like $ inside and outside brackets, like for example
SPEED=$(( $TOTALSIZE/$DIFF ))
So I've just taken the $ out from inside the brackets and it seems to complete without error.