Made an interface for libdirhelper and improved the tests