remove_xs_entry has race conditions, we should rewrite it.

Why is it OK to not to raise an exception if the path does not exist? The original path raised one.