They fixed a lot of path problems between your version and 3.8.2. You might want to try copying the external.php from 3.8.2 and see if it fixes it. It should not be incompatible with the version you are running from what I see in the code. Also, on the chance this is a "red herring" error message, have you checked your error log to see if it gives you any clues?