fixed perl build scripts (test dir) so they stop when the run into errors