def cutpath(root, path):
    """Cuts the root from the given path if the path is prefixed with the
	root."""
    if not root[-1] == '/':
        root = root + '/'
    if path.startswith(root):
        return path[len(root):]
    else:
        return path
