withExt

private fun withExt(path: String, ext: String): String

Returns a path with the given extension, replacing any existing one.