Delete folder if exists and regen.
Fix bug deleting the folder happens all the time.
Add test for delete and regenerate html file.