allow getcwd to alloc mamory dynamical (more or less)