Pattern generator fixes

Pattern generator is not interpreting some patterns correctly; lower
case character patterns in particular.
Merge pull request #21 from GothikX/BUGFIX_PatternGeneratorFixes

Pattern generator fixes