Added option for matching valid pathnames