Replace use of fnmatch with regex in debugging API. This allows us to use regex's when specifying which modules should have debug info outputted.