selftest: use "state directory" and "cache directory" options