Shell syntax fixes (POSIX): \e, \a and [[

This is required for when the script is executed (and not sourced), and
/bin/sh is not linked to zsh/bash/...