os.error does not catch IOError

Modified exceptions to include IOError
PEP8 (two lines between functions)