fix pwd configuration for root

`getwd` doesn't get into account symbolic link of current pwd