bugfixes in tests for osx
bugfixes in tests for osx

amoffat/sh,hacosta/python-sh,achernet/sh,rdhyee/sh,pombredanne/sh,simudream/sh,lwgarmstrong/sh,pdelong42/sh,z-fork/sh,germangh/sh,jakirkham/sh,hacosta/python-sh,ppannuto/sh,Stupeflix/sh,amoffat/sh,rsmith31415/sh,twocngdagz/sh