Fix tests (path  may be None or empty)