'Create a new node certificate signed by the root and write it out to
the current directory.
:raise PathError: When the root certificate and key cannot be found.'

def run(self):

    if (self['inputpath'] is None):
        self['inputpath'] = os.getcwd()
    if (self['outputpath'] is None):
        self['outputpath'] = os.getcwd()
    self['inputpath'] = FilePath(self['inputpath'])
    self['outputpath'] = FilePath(self['outputpath'])
    try:
        try:
            self['name'] = self['name'].decode('utf-8')
            ca = RootCredential.from_path(self['inputpath'])
            uc = UserCredential.initialize(self['outputpath'], ca, self['name'])
            self._sys_module.stdout.write(u'Created    {user}.crt.    You    can    now    give    it    to    your    API    enduser    so    they    can    access    the    control    service    API.\n'.format(user=uc.username).encode('utf-8'))
        except PathError as e:
            raise UsageError(str(e))
        except (UnicodeEncodeError, UnicodeDecodeError):
            raise UsageError(u'Invalid    username:    Could    not    be    converted    to    UTF-8')
    except UsageError as e:
        raise SystemExit(u'Error:    {error}'.format(error=str(e)))
    return succeed(None)
