runtime/qio: use getcwd instead of getwd

getwd is deprecated in favor of getcwd.

Related to #325.
I'm creating the test and wondering what's the better approach to get MAXPATHLEN. Writing a C program that prints the value of the constant seems over for me. What do you think?