Corrected sed bug on Mac and not creating .stax directory.

I added the code for the ${HOME}/.stax creation and corrected the sed bug on Mac. I've not tested on alternate platform so that needs to be done.