Fix getcwd() non-portability
Brought to you by:
toast
getcwd(NULL, 0) isn't portable, and resulted in some strange -C bugs on Solaris.
This switches it over to a fixed buffer of size MAXPATHLEN.
It also does some error checking.
This patch is also, hopefully, going into GCC's version of fastjar.
Patch for getcwd() portability