Add ErlyDTL support

It's a bit messy, but it works...
Merge pull request #27 from Forkk/master

Add (somewhat messy) ErlyDTL support