Update build script
Export foreach/3
Get the escript to work