get_comment_obj() fix

should act differently if last item is directory vs file