added intermediary results output

added distance transform output to pgm file
added labeled skeleton image output to pgm file
added chains of skeleton image output to pgm file