Mike is correct that it is WeBWorK/Constants.pm that is complaining.
I was able to make this error go away by editing Constants.pm (temporarily)
to not use $WeBWorK::Constants::WEBWORK_DIRECTORY.
After my edit and downloading your fixes to OPL-update, I was able to run the script with no problems.
Bill