delete generated HTML file before generating new one, not at the bottom
Bug was that when confirming "[E]dit again" by providing an empty string,
the file wasn't deleted
we could as well do
if [ "$post_status" != "p" ] && [ "$post_status" != "P" ]
but this way is IMO cleaner