Implementation of Path.resolve(other)