Added timeout to the connection.

Added an extra option that allows a timeout to be set works with node 0.10.x