[[ isn't actually available in the system's default shell.
[[
Fixes error: [[: not found.
[[: not found
Also adds default bash safeguards.