add directory-stream.js and test file