remove unreachable code
use context manager to close file, and more explicit variable name
move first part of the logic into a wrapping function

this should help to decouple from the filesystem and heuristic in
filenames
make _save annotation a io-less method
clearup unused arguments and close P tags
split _save_annotation on multiple function

will allow refactor of the cython magic not to parse temporary files
and not to leak css into IPython notebooks
add unique class name to avoid conflic

in particular tings like 'code' are conflicting when embeding the page
forgotten self
thou no need space for css selector
use css class for styling
Do not use potentially not unique id to collapse

generated html can be added many time in one page relying on line number
to collapse is dangerous.

Walking the dom to  get next children is more reliable
some cleanup
reorganise block order, and cleanup now useless logic

special_char was use before for counting column offset, now removed.
replace by escape_html
Merge pull request #257 from Carreau/clean-annotate

Clean html-annotate generation