SFTP: make it so files can be downloaded into resources or upload from resources

Fixes #428
There is a doc block saying $data is a String. Should be string|resource instead or so?