Fixed broken getcwd() call