def tidy_path(path):
    """Helper function for formatting a path
    :param str path: path to be formatted
    :return: formatted path
    """
    if (not path.startswith('/')):
        path = '/' + path
    if (not path.endswith('/')):
        path += '/'
    return path