additional testing

improved directory detection in build script
all build scripts get smart directory detection