Split Tone Script with Edge Detection

This is a simple modification of the split tone script of tuxcomputers. It adds optional edge detection. I did also some clean-up and some encapsulation to avoid confusion with other scripts.
Copy it into the scripts folder from GIMP, you will find it then under Filters → Colours → Split Tone with ED.

Examples here and here: