Close and release the CFWriteStream used to write projects when done

I was hitting a crash when generating thousands of projects at a time due to these file handles being leaked.