Better handling of wildcards using fnmatch