Adds additional tests and fixes for attributes and top level nodes

When requesting a node at the moment the stream reader will return the node below it, giving incorrect results depending on your usage.

This allows the stream reader to return the correct node along with associated attributes and updates the unit tests to ensure that is the case