[#1289] Make temporary directory checks portable to ksh93 (#1291)
Fixes #1289.
`setup`, `upgrade`, and other server scripts source `_script-util.sh`
through `/bin/sh`. On ksh93, its `local` commands fail, leaving the
executable-directory probe without its arguments and preventing the
Bouncy Castle fallback from working.
Run the probe in a subshell to keep its variables private in POSIX
shells, and branch on its result directly when choosing the Bouncy
Castle installation directory. The existing explicit directory and
noexec fallback behavior are preserved.
The regression test exercises the real probe on executable and
non-executable files, checks cleanup of a created directory, and
verifies fallback warnings and explicit-directory handling. CI runs it
under ksh93 on macOS and dash on Linux.
Validation:
- The regression test passed under OpenIndiana Hipster 2026.10
(`/bin/sh`, ksh93u+); the original utility failed there with `local: not
found`.
- It also passed locally with ksh, dash, bash, and `/bin/sh`. The added
checks detected the reviewed probe, cleanup, and warning mutations; dash
rejected the non-POSIX conditional mutation.
- A Linux container test with a real noexec `/dev/shm` selected an
executable `$HOME`.
- Shell syntax checks, workflow YAML parsing, and `git diff --check`
passed. Oracle Solaris was not tested.
This change targets POSIX shells, including ksh93. The scripts already
use POSIX constructs that are incompatible with the traditional SVR4
Bourne shell; Solaris 10 compatibility and its support status remain
unverified.