HTMLRef: Make separate entries for each of the H1-H6 tags (fixes #33)

This should fix the problem described in #33, but may need more work. The code looks correct, but the output is very different from the output.txt in the repo. The one in the repo has 8 fields; the one generated by the code has 13. I'm still not sure which one is the preferred format.

I also changed the interpreter to explicitly be `python2`. I think that may reduce confusion for new developers in the future.

Furthermore, I changed `bash` to `sh`. There's no need for any of bash's advanced features, and sh is often orders of magnitude smaller and faster.