fixed leak of resource in sftp->ensureDirectoryExists()

cleanup after a successfull call to opendir(), so the OS will not get
out of resource handles on long running processes.
Merge pull request #242 from staabm/sftpleak2

fixed leak of resource in sftp->ensureDirectoryExists()