'Check the specified path on the remote host to determine if
it is a directory.
:type path: string
:param path: The path to the directory that you want to check.
:rtype: integer
:return: If the path is a directory, the function returns 1.
If the path is a file or an invalid path, the function
returns 0.'

def isdir(self, path):

    status = self.run(('[    -d    %s    ]    ||    echo    "FALSE"' % path))
    if status[1].startswith('FALSE'):
        return 0
    return 1
