test script out of blib during building

To actually test the use of the script when building in a blib
directory, you have to use the script in the blib directory, which
wasn't being done before. If a blib environment is detected, use
the blib script location and the blib/lib include path.

In the future, it may be found that it is more accurate to call the bat
file in a Windows environment.