This is how SingleFile writes HTML by default :). However, it is also the most duplicated issue in the tracker.

You can link it: https://github.com/gildas-lormeau/SingleFile

Pretty neat extension!