cloudmonkey: fix set command issue, close stdout/err when exiting cloudmonkey

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>