tests for scaffold.Document

Also closing some HTML elements in main.html to make it XML parseable for testing.