Update sh.py

Updated the which implementation to use os.path.isfile, fix for #196