Add --dir and --scan-only switches.