ENH: Fixes PDFSegmenter python script.

Change-Id: If9d6e4c4b4059026142c3d22d9467d90023e42b4