Hi Philip...
If I give the -d <dir> option to unsquashfs 4.2 and <dir> already exists but is empty, stderr output is "dir_scan: failed to make directory <dir>, because File exists". But then nothing is unsquashed, and, even so, the exit status of the unsquashfs process is 0.
I think probably if unsquashfs 4.2 fails for any reason, then its exit status should be nonzero.
I think probably if the output directory exists but is empty, unsquashfs should not refuse to use it, but this is more a matter of style, really.
So I think there are two problems here, but clearly the only critical one is the exit status's failure to be nonzero when unsquashing fails.