Avoid usage of deprecated methods in tests
[SSHD-355] Correctly handle permissions when opening files through SFTP
[SSHD-364] Fix SFTP writes with offset