Relative URLs using File Scheme

I ran into an interesting problem where I wanted to specify a relative file path in a <code>file:</code> scheme (don't ask me why on earth would I want to do that). Here is what worked ( from an answer by ElliotteRustyHarold - a genius).

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.