Added rmtree() for remote.

Made a fix to recursion for when max_depth is None.