Updated to support unthreaded Tcl and fixed a memory leak with home directory determination