Changed location of temp directory
Updated expect script to return more specific error codes