adding in tee program (index.js)

based on the instructions, i think this is what you're looking for. I'm sure you'll tell me if it's not.
First one I've seen that error checks, nice.