Fix get_ipython_dir when $HOME is /

Pretty self-explanatory. Many Unix flavors set $HOME to / for root.