Add interrupt() support for cpdir and rmdir

In large codebases, cpdir and rmdir can take quite some time, it make sense to be interruptible.
So I'm adding interrupt() according to ShellCommand's implementation