added -f option to filter filename formats. Uses minimatch module