Relocate an absolute path to a new root directory.

def _root(path, root):
    '''
    Relocate an absolute path to a new root directory.
    '''
    if root:
        return os.path.join(root, os.path.relpath(path, os.path.sep))
    else:
        return path