Added compatibility with tests loaded from directory