Refactor: remoted: Avoid TOCTOU when cleaning up remote schema dir
This is rather trivial and should not pose a real safety/reliability
risk. However, Coverity identified it as a TOCTOU bug, and cleaning it
up seems like an improvement.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>