added support for moving, copying and clearing scratch dir