Fix two functions in which the result of realloc was not being captured correctly
Merge pull request #745 from noakesmichael/longArgv

Address glibc memory error for some I/O routines

There were two points in the QIO library where the code is attempting to determine the
Current Working Directory using a posix routine that has an unfortunate buffer allocation
requirement.  The runtime code to manage this buffer allocation relied on realloc to grow
a buffer but then failed to assign the new memory to the buffer ptr.  However it did update
the buffer size.  This lead to a buffer overrun.

Compiled: Clang on darwin, GCC on linux
Tested: Verified the fix for types/file/freadComplex.chpl.  Temporarily reduced the initial buffer size of just 8 bytes and verified.  Ran the full regression suite.
Reviewed: Kyle