Check the existence of the given file and directory path.
           1. Raise Runtime exception of both not existed.
           2. If the ``curwp`` is None, the set the base folder of ``curinf`` to it.

def check_infile_and_wp(curinf, curwp):
        """Check the existence of the given file and directory path.
           1. Raise Runtime exception of both not existed.
           2. If the ``curwp`` is None, the set the base folder of ``curinf`` to it.
        """
        if not os.path.exists(curinf):
            if curwp is None:
                TauDEM.error('You must specify one of the workspace and the '
                             'full path of input file!')
            curinf = curwp + os.sep + curinf
            curinf = os.path.abspath(curinf)
            if not os.path.exists(curinf):
                TauDEM.error('Input files parameter %s is not existed!' % curinf)
        else:
            curinf = os.path.abspath(curinf)
            if curwp is None:
                curwp = os.path.dirname(curinf)
        return curinf, curwp