Properly escape regex when looking for env_path