Changes:
- Explicit shebang (make it explicit). It not required but clarifies syntax used.
- ShellCheck suggested fixes.
- Correct mirroring of `doxcat` to first physical cons if serial cons is primary.
- Add protection for accidental closure of primary screen.
- Minor optimizations