the path convertion algorithm was wrong, I fixed it. However I only tested on 20+ cases, maybe chroot(2) is better