Change line break matching in execute

Match line breaks at end rather then at beginning to avoid out of sync
issues for some sources.
Fix incorrect (old) usage of fatal in unit tests

These should have been updated in fb0b28c