fix reading of longs, support index.html being an index of a directory
Merge branch 'master' of github.com:tetrapods/core