Added scripting support to sh and fixed bug in tokenize()