I just aped the similar code from `safe_execfile`.  Fixed.