better sftp implementation withou errors on mkdir