Bugfixes

Please accept those little bugfixes. Tests are all working (including your testInitDirectory which was broken at least on windows.. don't ask me why i didn't see this test fail the last time i checked)