You should pick up the robot path instead of grabbing the value of some random environment variable `$CFGS`.

Try and take into account somehow that the robot path might contain multiple entries, separated by `os.pathsep` (`:`).