Fix error: bad character range on brackets in directory name

In glob brackets [ ] have special meaning.
Switched to listdir with regular expression search,
this also removes case-sensitivity from the TODO list.
Merge pull request #574 from itofzo/fix_error_bad_character_range_PIS

Fix error: bad character range on brackets in directory name