Use IPython locating functions instead of using subprocess

Merely a matter of cleanliness, since IPython provides API to locate the profile directory.