update build script to prepare install directory