Added checks for ScriptError(NoScopesDefined)

Environment.{get,set}Var both currently fail, as expected. Will need to
work on updating them later.