Created path conversion function.