fix exception raised if header parsing fails
add test for invalid section header
add info to exception for excess nonsense following an option
give up on keeping track of line number properly