fix BP env arg dir detection