added working directory control
general bugfixes and consequent changes to the tests
added installer