Download an attachment. The files are currently not cached since they
        can be overwritten on the server.

        Parameters
        ----------
        filename : string, optional
            Optional name for the file on local disk.

        Returns
        -------
        string
            Path to downloaded temporary file on disk

def download(self, filename=None):
        """Download an attachment. The files are currently not cached since they
        can be overwritten on the server.

        Parameters
        ----------
        filename : string, optional
            Optional name for the file on local disk.

        Returns
        -------
        string
            Path to downloaded temporary file on disk
        """
        tmp_file, f_suffix = download_file(self.url)
        if not filename is None:
            shutil.move(tmp_file, filename)
            return filename
        else:
            return tmp_file