ovl: fix getcwd() failure after unsuccessful rmdir