Fixup matching of system and non-system paths

Binary dirs starting with "MITK" were not recognized correctly
Merge branch 'bug-18547-modernize-cmake'