Properly handle `IOError`'s and `OSError`'s at the parser level.
Merge pull request #11535 from s0undt3ch/2014.1

Properly handle `IOError`'s and `OSError`'s at the parser level.