factor.rb: added path_environment_variable

Closes #7772
Merge pull request #7790 from vitorgalvao/factor-path

factor.rb: added path_environment_variable