d2: correct is_substring checks in releasetools.py

Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>