fix path manipulation to work with symlinks

fix path manipulation so that it works when you have a symlink to nbconvert2.py

Why doesn't the old code work? 

For example, if `__file__` is /usr/local/bin/nbconvert (from following the instructions in the readme) then `os.path.dirname(__file__)` is  /usr/local/bin