Add subdirectory support to certScanner and its tests