check for write timeout, even if EAGAIN was rised, fix #45
diff --git a/serial/serialposix.py b/serial/serialposix.py
index 2476cb0..e2835e7 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -540,6 +540,9 @@
             except OSError as v:
                 if v.errno != errno.EAGAIN:
                     raise SerialException('write failed: %s' % (v,))
+                # still calculate and check timeout
+                if timeout and timeout - time.time() < 0:
+                    raise writeTimeoutError
         return len(data)
 
     def flush(self):