Added timeout option and socket closing verification
Removed internal try\excepts and added the socket.close() to finally.
Merge pull request #4 from tomkregenbild/master

Added timeout option and socket closing verification