Non-object JSON roots

Updated parser to emit the `root` event for the top-level JSON value, not just objects & arrays. Also fixed test script for npm so it also runs under Windows.