[PATCH 3/4] os-posix: refactor code handling the -chroot argument