I know when a story is finished when there is not a single thing more I can think to do to it. And since I know at the start what the last line will be, I know when I've reached that point as logically as I can that it's finished. As for the rewriting-it's not foolproof, of course, but if you're honest about having thought of every possibility and you still come back to what you have, what more can you do?