Stupid me.

Fixes string.DirectoryName to not include the last '/'