I have an external PHP script that bootstraps Drupal, and that lives in a subfolder of my Drupal install dir.
After bootstrapping, this script calls some functionality from the Wysiwyg module. I discovered that the functionality doesn't currently work if called from a script that lives outside of the Drupal root, as there are several places where it should be (but is not) prepending
DRUPAL_ROOT to the file path.
Attached patch fixes this, by appending
DRUPAL_ROOT where necessary.
This also depends on: #1924212: Need DRUPAL_ROOT in file_scan_directory