fixed delete for SFTP

I had issues with deleting folders on SFTP connections.
This fixed it for me.