You might want to change this to:
```D
if (ext[0] == '.')
    ext = ext[1 .. $];
```
It avoids the only (and unecessary) unicode decode, which makes this function potentialy nothrow.