add tests for length, lastModified

- add tests for `length()`, `lastModified()`
- fix issues with both in the html impl
oops :) I should always double-check when I think I need a cast