bugfix, cleanup and optimize of the HtmlFilesystem

Mainly fixed some bugs in stat()