Add defensive semi-colons

Concatenation with other scripts can potentially cause problems if this
isn't done.
Escape backslashes in terminal escape codes