build scripts: fixes and additions