dos.library: Accurately report the error on failure of LoadSeg()
Previously, the Close() at the end of LoadSeg() would always set IoErr() to 0,
which prevented C:Shell from getting ERROR_NOT_EXECUTABLE, which
prevented C:Shell from recognizing shell scripts and passing them to C:Execute.
All fixed now, by simply caching the IoErr() from InternalLoadSeg(), and
resetting it after the close
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@40198 fb15a70f-31f2-0310-bbcc-cdcc74a49acc