Fix copy operation

Do not use locks when moving or copying folders to avoid creating empty
files.

Moved is_dir() check to the storage wrapper's rename() and copy() methods.
Now using $this->storage for the is_dir() check.

Removed clearstatcache() which does not seem to be needed any more when
using $this->storage.