use errno attr instead of index into args for errno

If an OSError or IOError are instantiated without an errno value, e.g.
e = OSError(). The existing code would give an IndexError: tuple index
out of range. OSError and IOError inherit from EnvironmentError which
takes the first item in args and uses that as the errno. The errno
attribute has existed since 1.5.2 so should be safe to always use.