Add lost connection management for sftp module. Add copy functionality and tidy move.