Performance fix for Pathname#prepend_prefix

See 05a456c231dc6da7cb0f7c70cb21feaf9a0d803c; same story.