Handle stream close gracefully; don't search for xml declaration twice
Graceful stream close handling, now more efficient
Support 'npm start'
Change end-of-stream check to allow whitespace
Swapped String.search for indexOf
Merge pull request #78 from gavllew/master

Fix exception on stream close, support 'npm start', and minor cleanup.