rg3/youtube-dl — pull request #785 by sagittarian (2013-04-11 05:07:23+00:00)
Title: Resolve the symlink if __main__.py is invoke as a symlink.

If you create a symlink to __main__.py and run that, sys.path does not get updated correctly so that it can find the youtube_dl module. Calling os.path.realpath fixes that.