Use a different escape sequence for saving and restoring the cursor

(hopefully that one works on the OSX terminal)

Also using the proper ESC sequence now everywhere.