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


Example of a wish-list item that seems like a natural fit for pysh: https://github.com/ipython/ipython/issues/5072