Use the profile_dir passed to the kernel.
Strip trailing output for echo kernel
Merge branch 'master' of https://github.com/blink1073/jupyter_kernel