not trying to discard the work done here.... but from what I see the script "simply" uses dd to output the sdcard contents into a file, which is then used by foremost.
I may be missing the point here, but why not simply tell users to directly type the two commands?