Fix getenv call so that it works when lunatest is called from another application