DESCRIPTION
The getcwd() function copies an absolute pathname of the current working directory
to the array pointed to by buf, which is of length size.
If the current absolute path name would require a buffer longer than size elements,
NULL is returned, and errno is set to ERANGE; an application should check for this
error, and allocate a larger buffer if necessary.
If buf is NULL, the behaviour of getcwd() is undefined.