Added modification to launch script to automatically patch the hostname in the preferences file when running on an EC2 instance.