improved extension filtering (not case sensitive)