Fix IPython.utils.path when HOME=/.
Fix subrepos.
Pop out any existing IPYTHONDIR or IPYTHON_DIR variables.
s/os.path.split/os.path.dirname/
Merge pull request #3330 from AnIrishDuck/master

Fix get_ipython_dir when $HOME is /