improved build.pl and added config option to fetch tarballs if we need them