ported the stack name bug fixes for deployment and execute commands from...

... the thor branch. This fixes issue #182.