I have suggestion how to improve line unwrapping a little bit. You only need to unwrap lines that are longer than certain threshold, for example, 50 chars. Shorter lines are probably headings, so do not remove line breaks for them.
Also, lines containing ------------ are used for underlining, so no removal of line breaks before and after them as well.
Python is not my forte but here is an example how it looks like:
cables_201012102105.epub