minor fix in UCI defaults script
for openwrt, check UCI autoapprove setting when writing out apps; code cleanup