Sanitize hostnames for keypairs

Fixes #76