add test suite

this looks like interesting way how to test it, but it require change of interface like you have above, which is wrong as test should not modify production code. Better way is to open own chroot like it is done e.g. here: https://github.com/yast/yast-yast2/pull/275/files#diff-c570c7b4573f33146aab46eadbc801d7R13
this way you set chroot path and it allows to work on test chroot which respect all code. It uses functionality that we use in installer when we work on /mnt where is target system