fixed dictionary length check logic
adding trivial pdf-rewriter.pl