also handle zero byte host key files.
had this on ubuntu for reasons i don't understand. (likely caused by this script or ubuntu 14.04's ssh upstart job)
This should ensure it'll go away with another reboot saving some lifes.
generate.sh is also modified so it copies the files from these
directories by default or use dir.$ENVIRONMENT if specified. For
example, use ENVIRONMENT=ec2 to copy the directories that end in .ec2:
ENVIRONMENT=ec2 ./generate.sh
base
base.ec2
base_deb
base_deb.ec2