Fix bug with reading in whole line for the nonterminal
Fix bug with punctuation leading space
Fix newlines in output and add in the correct rsg_ref
Add simple test script