miscellanous fix for build stream features
add mocha test for build stream, fix bugs for build stream