Various fixes to get deployment working on ot7

These changes were required to get deployment working on a virgin ec2 instance (ot7). This does not fix the issue with rsync being used before it was installed, which I dealt with manually.