Formats correctly the string output from the invoke() method,
        replacing line breaks and tabs when necessary.

def format_invoke_command(self, string):
        """
        Formats correctly the string output from the invoke() method,
        replacing line breaks and tabs when necessary.
        """

        string = string.replace('\\n', '\n')

        formated_response = ''
        for line in string.splitlines():
            if line.startswith('REPORT'):
                line = line.replace('\t', '\n')
            if line.startswith('[DEBUG]'):
                line = line.replace('\t', ' ')
            formated_response += line + '\n'
        formated_response = formated_response.replace('\n\n', '\n')

        return formated_response