Fixes file matching with systems that don't have fnmatch

I am running Phabricator on Asustor NAS which is non-posix system. This PR makes it compatible with those systems. I will continue testing but for me it seems to be working fine :).