Cope with non-newline-terminated scripts.