Replace POSIX `[ ]` with bash `[[ ]]` on four conditionals: file/path existence checks and an array length comparison. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>