Added some functions for file handling over ssh.