Newline after scripts

A (possible) fix for #748. There may be some corner cases I haven’t considered in relation to this, but I think this gives better and more consistent behaviour than before.