I/O [Solaris]: Fix getcwd() on Solaris. On Solaris getcwd(NULL, x) only works if x is > 0. Fixes building issues on Solaris.