def splitPath(path, sep='/'):
    """
        Chops the first part of a /-separated path and returns a tuple
        of the first part and the tail.
        If no separator in the path, the tail is None
    """
    sepIdx = path.find(sep)
    if sepIdx < 0:
        return (path, None)

    return path[:sepIdx], path[sepIdx + 1:]