Fixed a few bugs in head and tail
Merge branch 'master' of https://github.com/0xdata/h2o