tests: add tests for minidom utils

* Strips XML output for newlines.

* Adds tests for minidom utils and amends tests where necessary
  to make the tests pass again after recent changes.

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>