Handle socket opening/closing in a cleaner way now.

Namely;

 - If anything goes wrong with the iwconfig call, we'll actually close it.
 - Raise OSError() if opening the socket fails for all functions,
   instead of just set_essid.