Fix tests

Fix directory handling in tests