Fixed a bug in parser, using glob in ocr

Originally a system call for dir was used, but glob is cross-platform,
and is actually meant for this.
The bug fix in parser prevents premature skipping of a section before it
is even parsed.