Close stream with error if 'to' not specified
Added tests for streams without proper 'to' attribute
Merge pull request #51 from krnekit/stream-empty-to

Close stream with error if 'to' not specified