Issue title: demo.js fails on io.js 1.2
 Issue body: Here's my process

```bash
git clone davidwagner@example.com:letsencrypt/node-acme.git
pushd node-acme
npm install
node demo.js
```

Tested working with v0.10.36

Testing FAILing with v1.2.0

Tests FAIL on both

```bash
npm install -g mocha
mocha tests/basic.js
```

(I'm assuming that's how mocha tests are meant to be run?)
 Comments: 
 Comment 0: ```
Server listening on port 4000
~~~> HTTP REQUEST
       Method: POST
       URL: https://localhost:4000/acme/new-authz
       Body: {"header":{"alg":"RS256","jwk":{"kty":"RSA","n":"nxX955SBd2WgcG1hthy4zRniGdeJzAlJHgqGzAP7NX9PMfY8H_l2NVWGeWRKaNzV9gVMBO7TC-xTNHNK72AAdqZDNAUDNqQyAwf4EBYUxm5Ymfa8vp9ggXslS5k8ch7NLsZIQJAACCdBSs8XT_S9AqWqNddf5bQN_HOkT3ZBIcKTv7nR0owHzp2zx4_ioVQjSWVYX3jz0Nlg2ZkdaQ9OLfrSkQeFHKnL1Qu2UY_vh4Xe5QNAZ4DEvDzcprmRouS8KfCALojpERNjVoZ3XBamscsppxus6QkzcLkGe3oJRq1KlvV5hZGlQyG3v0iGprtORHX4Ll27vvUHVFWCZQQ07Q","e":"AQAB"}},"protected":"eyJub25jZSI6Ik5sUUZIbWhrZFZEaTV3SzBBblNfT2cifQ","payload":"eyJpZGVudGlmaWVyIjp7InR5cGUiOiJkbnMiLCJ2YWx1ZSI6ImxvY2FsaG9zdCJ9fQ","signature":"eAjFufvxKN_S0_qPP7hhzTb4Cu42Y9jPJz_niMw7Ml-3RMxg2FTcOmZA_f6wzR1AUjjz-uOWNgPjZ8Ym1z1953Jns0u2aH7KcCMZYxCAPoTRKChCizn_gH2UvwAC4UEapcezXGdRTIczrwnuDt2HlW_tPTTM0lpRDIcGbC-e-k8yzGnt7_HX-QbZTjsHd_av661pq9C3969POLX_tZqxkA_8FhKB9sXJ2uXuBvnrDDF0M6pvPoqgw3CU5GEqYWJTPMBhyQ5hZHwf40afhvx5NQ72yIGdVyptv4FLiFj3aV_STmWzAUUqK8wHdLb6IfhOMjFMIjzdeq6Mc6Z4h9KNUw"}
events.js:125
      throw er; // Unhandled 'error' event
            ^
Error: socket hang up
    at createHangUpError (_http_client.js:192:15)
    at TLSSocket.socketOnEnd (_http_client.js:270:23)
    at emitNone (events.js:70:20)
    at TLSSocket.emit (events.js:147:7)
    at _stream_readable.js:891:16
    at process._tickCallback (node.js:337:11)
```
 Comment 1: Also fails with node v0.12
 Comment 2: @bifurcation, take a look?

@coolaj86, just to set expectations correctly, this is a proof of concept implementation and is likely to be spottily maintained. The official client that we plan to launch is at https://github.com/letsencrypt/lets-encrypt-preview. That said, we're happy to accept pull requests on this one since it's useful to have multiple implementations, and some people may want a node version.
 Comment 3: I want the node version.

I'm working on a home cloud that I'd like to release the same day that Let's Encrypt launches in hopes of being the "first secure home cloud", so you'll be seeing more of me. :-D
 Comment 4: Pleased to meet you, and glad Let's Encrypt will help you achieve your goals! You may also be interested to know that the latest version of the server-side software is at https://github.com/letsencrypt/boulder and we keep a generally up-to-date live testing davidwagner@example.com (only accessible by ACME protocol, doesn't serve anything meaningful to web clients). So if you want to test code against that you are welcome to.
 Comment 5: Thanks @jsha! And who do I tell when www.letsencrypt-demo.org appears to be borked? I just ran the demo.js and swapped the local server for the "real" one https://github.com/letsencrypt/node-acme/blob/master/demo.js#L5, but here's what I get:

```
~~~> HTTP REQUEST
       Method: POST
       URL: https://www.letsencrypt-demo.org/acme/new-authz
       Body: {"header":{"alg":"RS256","jwk":{"kty":"RSA","n":"4mNUFBI2Xdo_iOyAI4eT7vdtnuhhqshAtuH5M5Xw-7wk5fAzph2mhWN-Q0emEX6hTw8NhhngVQzMJyQiiFIP1NdWzYmBQZ7-5tfqnOIkMmlQmPF1xnPMTRkPSOAZBROBlj8wry8m_uMfIFFozR54lVJ4yMWq9V8Igq7wiOMmg5qezCoGNrfg2lCv3dx9MgKLNb1twzFW0GrrD7_1bys_ZnoDd2ZtCR553pIr-qLYNZugtRyP98fF1fEthZXJ8MYdcNulcUUTBTBoYjRpmO9xX3cZOw2QY5z2ezZM2Wtl1Y0XYtplF1psi_MUYntr817NzCdGHLkQXBlbr21i4fivYQ","e":"AQAB"}},"protected":"eyJub25jZSI6ImVUYW1kaHFLZUljQ1hnc0VCSG9Kd3cifQ","payload":"eyJpZGVudGlmaWVyIjp7InR5cGUiOiJkbnMiLCJ2YWx1ZSI6ImxvY2FsaG9zdCJ9fQ","signature":"lYD31y8Uko_e-sT_vBWDGF3IBlF6Mk3lKuyfXOnEaGhXk7jelVTUE8XGK9zH-_3hnDM34ulgzxuBbZfgrCyIFqOOZU8nPBS97-kGz9E7Rejic8REFtJG0l36Yy55BxY_wvfhJmBCP_IE-O1Qufer7Se5tJoaWt2_MtI6Z3UNmvm4W5xFSAq3k7tDxt0ydq8wca3qmjrqbYhUiWaSKXKiOsEXyFa29Vce9RZtREls1FPFK1bTNUXKcUX-TqWuKe-PgKSfI2y2a2B12sdo4cIoagdxmuzGwX6OzYb0D5rsk2yY0rnXjFcKuXI7W4QOJMaVF07MbhUkEJxyrUL_EsrZFw"}
<~~~ HTTP RESPONSE
       Code: 502
       Header: {"server":"nginx/1.4.6 (Ubuntu)","date":"Thu, 19 Feb 2015 04:37:17 GMT","content-type":"text/html","content-length":"181","connection":"close"}
       Body: <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
```
 Comment 6: That would be my or @jdkasten. There's also an IRC channel you can join. James, can you post that here?

Also, James, it appears that the acme-server instance may have gotten regenerated: It has a new host key and I can no longer SSH in. Any idea what's up?
 Comment 7: Sorry about the delay on this.  The channel is #letsencrypt on freenode.

I am not sure what happened, but I have restarted the server. (Sorry, the python client development hasn't started using Boulder yet or else I would recognize the situation very quickly)
{'source': 'GithubIssues', 'repo_name_with_owner': 'letsencrypt/node-acme', 'issue_id': 58149576, 'repo_stars': 287.0}