Simple python program that matches paths to patterns