Replace @rmtry shell implementation with a lua implementation
This way @rmtry is now rootdir friendly
It also allows cross installation (arm rootdir on amd64 host for example)
Reviewed by: pormtgr (mat)
Differential Revision: https://reviews.freebsd.org/D23618