rtrim curl response in detect_ip

Resolves issue #1