Fix Issue 13367 - Buffer overflow when setting PATH

https://issues.dlang.org/show_bug.cgi?id=13367

Fixup for pull #2332.