Make parser.js work for node.
Also allow multiple newlines after the header block.
Adding test cases and a validate.js file to use with node.
Adding parsing of BOM.