fix a bug on value checking on command
integrate device directly in command instead of sendMessage
Fix cgi and python script file permissions