Restore previous invariant in open()

This version of open previously stored any error generated by the attempt
in an out parameter, but was altered to generate these errors within the
function.  Most of the errors were already specified in the C functions
called, so the error message did not need to be expanded in the first place.
This commit removes the expressions which would throw errors and saves the
errors into the function argument again.

Note: this patch requires testing HDFS and curl, actions that are non-trivial at this point.
Since the problem itself was a coding practice rather than a true bug, this patch
will wait until testing is more reasonable.