'Downloads a file from the remote server and returns it as a string.
Arguments:
remote(str): The remote filename to download.
Examples:
>>> with file(\'/tmp/bar\',\'w+\') as f:
...     f.write(\'Hello, world\')
>>> s =  ssh(host=\'example.pwnme\',
...         user=\'travis\',
...         password=\'demopass\',
...         cache=False)
>>> s.download_data(\'/tmp/bar\')
\'Hello, world\'
>>> s._sftp = None
>>> s._tried_sftp = True
>>> s.download_data(\'/tmp/bar\')
\'Hello, world\''

def download_data(self, remote):

    with self.progress(('Downloading    %r' % remote)) as p:
        with open(self._download_to_cache(remote, p)) as fd:
            return fd.read()
