Adding initExpect.

Adding necessary expect/tcl initialization (as separate function) before spwan.