Various bug fixes to awsdeploy.sh