Bugfix (thx @andrestelex) and code cleanup

Fixed bug where script would stop with an error when it tried to
tunnify a segment with 2 vertical handles. Improved docstring.