factor.rb: added path_environment_variable

Closes #7772