Provided by avar on IRC: http://github.com/avar/RelativeLink/commit/895886337f907879598982b9ce104b9b8f3b2fbf