Issue547: fixes pysh profile and creates pysh extension

This is my proposed fix for a very old issue: https://github.com/ipython/ipython/issues/547