Fix error with existing paths

- this error often occurs when the class was used in phpunit's setUp()