Fix issue 10601.

If extension is empty, std.path.setExtension should be equivalent to
std.path.stripExtension. This special case is useful in generic code
that needs to alternate between, e.g., .exe on Windows and no executable
extension on Posix.