Got NUnit export working on PowerShell v2 again.

Fixes #153

Assignment to WriteEndDocumentOnClose was unnecessary, since it defaults to True anyway.  The property doesn't exist prior to .NET 4.5, and the code appears to generate identical files either way.

While running the unit tests on PowerShell 2.0, also came across another instance of v2 weirdness (foreach on a null collection executing the body once.)  Added test for null before enumerating.