You should not try loading the main RED settings file directly - as it may not be the file being used... especially if node-red is being embedded.

Instead, you should use:

    var twiliokey = RED.settings.twilio || require(process.env.NODE_RED_HOME+"/../twiliokey.js");