Merge pull request #3619 from arnova/sftp_stat_fix